Package gaiasky.util.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
gaiasky.util.io.ByteBufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferInputStream(int bufferSize) Creates a stream with a new non-direct buffer of the specified size.ByteBufferInputStream(ByteBuffer byteBuffer) Creates an uninitialized stream that cannot be used untilsetByteBuffer(ByteBuffer)is called. -
Method Summary
Modifier and TypeMethodDescriptionintintread()intread(byte[] bytes, int offset, int length) voidsetByteBuffer(ByteBuffer byteBuffer) Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ByteBufferInputStream
public ByteBufferInputStream() -
ByteBufferInputStream
public ByteBufferInputStream(int bufferSize) Creates a stream with a new non-direct buffer of the specified size. The position and limit of the buffer is zero. -
ByteBufferInputStream
Creates an uninitialized stream that cannot be used untilsetByteBuffer(ByteBuffer)is called.
-
-
Method Details
-
getByteBuffer
-
setByteBuffer
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-