public class ByteBufferInputStream extends InputStream
ByteBuffer| Constructor and Description |
|---|
ByteBufferInputStream(ByteBuffer byteBuffer) |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Return the available bytes
|
void |
close()
Close this stream.
|
boolean |
markSupported()
Return true if mark is supported.
|
int |
read()
Read the first byte from the wrapped
ByteBuffer. |
int |
read(byte[] b)
Read the bytes from the wrapped
ByteBuffer. |
int |
read(byte[] b,
int offset,
int length)
Read the first byte of the wrapped
ByteBuffer. |
void |
setByteBuffer(ByteBuffer byteBuffer)
Set the wrapped
ByteBuffer |
mark, reset, skippublic ByteBufferInputStream(ByteBuffer byteBuffer)
public void setByteBuffer(ByteBuffer byteBuffer)
ByteBufferbyteBuffer - The wrapped byteBufferpublic int available()
available in class InputStreampublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read()
ByteBuffer.read in class InputStreampublic int read(byte[] b)
ByteBuffer.read in class InputStreampublic int read(byte[] b,
int offset,
int length)
ByteBuffer.read in class InputStreamCopyright © 2005–2018 Oracle Corporation. All rights reserved.