Package 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,java.lang.AutoCloseable,javax.mail.internet.SharedInputStream
public class SharedRandomContentInputStream extends java.io.BufferedInputStream implements javax.mail.internet.SharedInputStreamA wrapper to an FileObject to get aSharedInputStream- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- imario@apache.org
-
-
Constructor Summary
Constructors Constructor Description SharedRandomContentInputStream(org.apache.commons.vfs.FileObject fo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcalcFilePosition(long nadd)voidclose()voidcloseAll()protected longgetFilePosition()longgetPosition()voidmark(int readlimit)java.io.InputStreamnewStream(long start, long end)intread()intread(byte[] b, int off, int len)voidreset()longskip(long n)
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
getFilePosition
protected long getFilePosition()
-
calcFilePosition
protected long calcFilePosition(long nadd)
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.BufferedInputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
getPosition
public long getPosition()
- Specified by:
getPositionin interfacejavax.mail.internet.SharedInputStream
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.BufferedInputStream- Throws:
java.io.IOException
-
newStream
public java.io.InputStream newStream(long start, long end)- Specified by:
newStreamin interfacejavax.mail.internet.SharedInputStream
-
closeAll
public void closeAll() throws java.io.IOException- Throws:
java.io.IOException
-
-