org.apache.commons.vfs.util
Class SharedRandomContentInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.apache.commons.vfs.util.SharedRandomContentInputStream
- All Implemented Interfaces:
- java.io.Closeable, javax.mail.internet.SharedInputStream
public class SharedRandomContentInputStream
- extends java.io.BufferedInputStream
- implements javax.mail.internet.SharedInputStream
A wrapper to an FileObject to get a SharedInputStream
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- imario@apache.org
Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos |
Fields inherited from class java.io.FilterInputStream |
in |
Methods inherited from class java.io.BufferedInputStream |
available, markSupported |
Methods inherited from class java.io.FilterInputStream |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedRandomContentInputStream
public SharedRandomContentInputStream(org.apache.commons.vfs.FileObject fo)
throws org.apache.commons.vfs.FileSystemException
- Throws:
org.apache.commons.vfs.FileSystemException
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
getFilePosition
protected long getFilePosition()
calcFilePosition
protected long calcFilePosition(long nadd)
mark
public void mark(int readlimit)
- Overrides:
mark
in class java.io.BufferedInputStream
reset
public void reset()
throws java.io.IOException
- Overrides:
reset
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
getPosition
public long getPosition()
- Specified by:
getPosition
in interface javax.mail.internet.SharedInputStream
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
newStream
public java.io.InputStream newStream(long start,
long end)
- Specified by:
newStream
in interface javax.mail.internet.SharedInputStream
closeAll
public void closeAll()
throws java.io.IOException
- Throws:
java.io.IOException