public class ByteBufferInputStream extends InputStream
ByteBuffer.| Constructor and Description |
|---|
ByteBufferInputStream() |
ByteBufferInputStream(ByteBuffer byteBuffer)
Creates an uninitialized stream that cannot be used until
setByteBuffer(ByteBuffer) is called. |
ByteBufferInputStream(int bufferSize)
Creates a stream with a new non-direct buffer of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
ByteBuffer |
getByteBuffer() |
int |
read() |
int |
read(byte[] bytes,
int offset,
int length) |
void |
setByteBuffer(ByteBuffer byteBuffer) |
close, mark, markSupported, read, reset, skippublic ByteBufferInputStream()
public ByteBufferInputStream(int bufferSize)
public ByteBufferInputStream(ByteBuffer byteBuffer)
setByteBuffer(ByteBuffer) is called.public ByteBuffer getByteBuffer()
public void setByteBuffer(ByteBuffer byteBuffer)
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] bytes,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionCopyright © 2023. All rights reserved.