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
ConstructorDescriptionBufferInputStream
(Buffer buffer) Create theInputStream
over GrizzlyBuffer
.BufferInputStream
(Buffer buffer, int position, int limit) Create theInputStream
over 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 theInputStream
over GrizzlyBuffer
. Constructed BufferInputStream read operations will affect the passedBuffer
position, which means each BufferInputStream read operation will shiftBuffer
's position by number of bytes, which were read.- Parameters:
buffer
-
-
BufferInputStream
Create theInputStream
over GrizzlyBuffer
. Constructed BufferInputStream read operations will *not* affect the passedBuffer
position, which means the passedBuffer
position will never be changed during BufferInputStream- Parameters:
buffer
-
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-