public class ByteBufferInputStream
extends java.io.InputStream
ByteBuffer.| Constructor and Description |
|---|
ByteBufferInputStream()
Creates an uninitialized stream that cannot be used until
setByteBuffer(ByteBuffer) is called. |
ByteBufferInputStream(java.nio.ByteBuffer byteBuffer) |
ByteBufferInputStream(int bufferSize)
Creates a stream with a new non-direct buffer of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
java.nio.ByteBuffer |
getByteBuffer() |
int |
read() |
int |
read(byte[] bytes,
int offset,
int length) |
void |
setByteBuffer(java.nio.ByteBuffer byteBuffer) |
public ByteBufferInputStream()
setByteBuffer(ByteBuffer) is called.public ByteBufferInputStream(int bufferSize)
public ByteBufferInputStream(java.nio.ByteBuffer byteBuffer)
public java.nio.ByteBuffer getByteBuffer()
public void setByteBuffer(java.nio.ByteBuffer byteBuffer)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] bytes,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionCopyright © 2019. All Rights Reserved.