java.lang.Object
java.io.InputStream
org.glassfish.grizzly.utils.BufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
InputStream implementation over Grizzly Buffer.- Author:
- Alexey Stashok
-
Constructor Summary
ConstructorsConstructorDescriptionBufferInputStream(Buffer buffer) Create theInputStreamover GrizzlyBuffer.BufferInputStream(Buffer buffer, int position, int limit) Create theInputStreamover GrizzlyBuffer. -
Method Summary
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
BufferInputStream
Create theInputStreamover GrizzlyBuffer. Constructed BufferInputStream read operations will affect the passedBufferposition, which means each BufferInputStream read operation will shiftBuffer's position by number of bytes, which were read.- Parameters:
buffer-
-
BufferInputStream
Create theInputStreamover GrizzlyBuffer. Constructed BufferInputStream read operations will *not* affect the passedBufferposition, which means the passedBufferposition will never be changed during BufferInputStream- Parameters:
buffer-
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-