InputStream which implements ByteInput and reads bytes from a ByteBuffer.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Implements org. |
| public void | close()
Overrides java. Implements java. |
| public int | read()
Implements abstract java. Implements org. |
| public int | read(final byte[]
the destination array b)Overrides java. Implements org. |
| public int | read(final byte[]
the destination array b, final int the offset into the array into which data should be read off, final int the number of bytes to attempt to fill in the destination array len)Overrides java. Implements org. |
| public long | skip(final long
the number of bytes to attempt to skip n)Overrides java. Implements org. n bytes of data from this input stream.
|
| buffer | back to summary |
|---|---|
| private final ByteBuffer buffer | |
| ByteBufferInput | back to summary |
|---|---|
| public ByteBufferInput(final ByteBuffer buffer) Construct a new instance.
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Implements org. Doc from org. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Implements org. Doc from org. Reads the next byte of data from the input stream. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b) throws IOException Overrides java. Implements org. Doc from org. Read some bytes from the input stream into the given array. Returns the number of bytes actually read (possibly zero), or -1 if the end of stream has been reached.
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b, final int off, final int len) throws IOException Overrides java. Implements org. Doc from org. Read some bytes from the input stream into the given array. Returns the number of bytes actually read (possibly zero), or -1 if the end of stream has been reached.
| |
| skip | back to summary |
|---|---|
| public long skip(final long n) throws IOException Overrides java. Implements org. Doc from org. Skips over and discards up to
| |