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
_length
private long
_offset
private long
_remaining
private static int
BUFFER_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 int
available()
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
long
skip(long n)
private void
skipBytes()
private void
skipBytesByReading(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:
markSupported
in classFilterInputStream
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
-