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
Modifier and TypeFieldDescriptionprotected long
protected final File
protected final InputStream
protected final long
protected long
protected final SharedFileInputStream
protected final long
-
Constructor Summary
ModifierConstructorDescriptionSharedFileInputStream
(File file) protected
SharedFileInputStream
(SharedFileInputStream parent, long start, long len) -
Method Summary
Modifier and TypeMethodDescriptionlong
getRoot()
void
mark
(int limit) boolean
newStream
(long start, long end) int
read()
int
read
(byte[] buffer) int
read
(byte[] buffer, int offset, int len) void
reset()
long
skip
(long len) protected static void
skip
(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:
getPosition
in interfacejavax.mail.internet.SharedInputStream
-
newStream
- Specified by:
newStream
in interfacejavax.mail.internet.SharedInputStream
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
mark
public void mark(int limit) - Overrides:
mark
in classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
getRoot
-