Class CmisContentRangeInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.ametys.plugins.workspaces.cmis.CmisContentRangeInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CmisContentRangeInputStream extends FilterInputStream
Copied from openCMIS Server Development Guide
-
-
Field Summary
Fields Modifier and Type Field Description private long_lengthprivate long_offsetprivate long_remainingprivate static intBUFFER_SIZE-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CmisContentRangeInputStream(InputStream stream, BigInteger offset, BigInteger length)create a RangeInputStream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)longskip(long n)private voidskipBytes()private voidskipBytesByReading(long remainingSkipBytes)-
Methods inherited from class java.io.FilterInputStream
close, mark, reset
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Field Detail
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
_offset
private long _offset
-
_length
private long _length
-
_remaining
private long _remaining
-
-
Constructor Detail
-
CmisContentRangeInputStream
public CmisContentRangeInputStream(InputStream stream, BigInteger offset, BigInteger length)
create a RangeInputStream- Parameters:
stream- streamoffset- offsetlength- length
-
-
Method Detail
-
skipBytes
private void skipBytes()
-
skipBytesByReading
private void skipBytesByReading(long remainingSkipBytes)
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classFilterInputStream
-
skip
public long skip(long n) throws IOException
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
public int available() throws IOException
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
-