Class BoundedSeekableByteChannelInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.compress.archivers.sevenz.BoundedSeekableByteChannelInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate longprivate final SeekableByteChannelprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionBoundedSeekableByteChannelInputStream(SeekableByteChannel channel, long size) -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
-
Field Details
-
MAX_BUF_LEN
private static final int MAX_BUF_LEN- See Also:
-
buffer
-
channel
-
bytesRemaining
private long bytesRemaining
-
-
Constructor Details
-
BoundedSeekableByteChannelInputStream
BoundedSeekableByteChannelInputStream(SeekableByteChannel channel, long size)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
Reads up to len bytes of data from the input stream into an array of bytes.An attempt is made to read as many as len bytes, but a smaller number may be read. The number of bytes actually read is returned as an integer.
This implementation may return 0 if the underlying
SeekableByteChannelis non-blocking and currently hasn't got any bytes available.- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Throws:
IOException
-