Class SharedFileInputStream
java.lang.Object
java.io.InputStream
org.nuxeo.ecm.automation.jaxrs.io.SharedFileInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,javax.mail.internet.SharedInputStream
public class SharedFileInputStream
extends InputStream
implements javax.mail.internet.SharedInputStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected final Fileprotected final InputStreamprotected final longprotected longprotected final SharedFileInputStreamprotected final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionSharedFileInputStream(File file) protectedSharedFileInputStream(SharedFileInputStream parent, long start, long len) -
Method Summary
Modifier and TypeMethodDescriptionlonggetRoot()voidmark(int limit) booleannewStream(long start, long end) intread()intread(byte[] buffer) intread(byte[] buffer, int offset, int len) voidreset()longskip(long len) protected static voidskip(InputStream in, long n) Skip reliably; this is more efficient than IOUtils.skip which calls read().Methods inherited from class java.io.InputStream
available, close, nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
in
-
parent
-
file
-
length
protected final long length -
start
protected final long start -
current
protected long current -
marked
protected long marked
-
-
Constructor Details
-
SharedFileInputStream
- Throws:
IOException
-
-
Method Details
-
skip
Skip reliably; this is more efficient than IOUtils.skip which calls read().- Throws:
IOException
-
getPosition
public long getPosition()- Specified by:
getPositionin interfacejavax.mail.internet.SharedInputStream
-
newStream
- Specified by:
newStreamin interfacejavax.mail.internet.SharedInputStream
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
mark
public void mark(int limit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
getRoot
-