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, skip
public 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 InputStream
IOException
public int read(byte[] bytes, int offset, int length) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
Copyright © 2018. All rights reserved.