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 ByteBuffer
private long
private final SeekableByteChannel
private static final int
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedSeekableByteChannelInputStream
(SeekableByteChannel channel, long size) -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, readAllBytes, readNBytes, reset, skip, transferTo
-
Field Details
-
MAX_BUF_LEN
private static final int MAX_BUF_LEN- See Also:
-
buffer
-
channel
-
bytesRemaining
private long bytesRemaining
-
-
Constructor Details
-
BoundedSeekableByteChannelInputStream
-
-
Method Details
-
read
- Specified by:
read
in 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
SeekableByteChannel
is non-blocking and currently hasn't got any bytes available.- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-