public class BufferInputStream extends InputStream
InputStream
implementation over Grizzly Buffer
.Constructor and Description |
---|
BufferInputStream(Buffer buffer)
Create the
InputStream over Grizzly Buffer . |
BufferInputStream(Buffer buffer,
int position,
int limit)
Create the
InputStream over Grizzly Buffer . |
Modifier and Type | Method and Description |
---|---|
int |
available() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
close, mark, markSupported, read, reset
public BufferInputStream(Buffer buffer)
InputStream
over Grizzly Buffer
.
Constructed BufferInputStream read operations will affect the
passed Buffer
position, which means each BufferInputStream
read operation will shift Buffer
's position by number of bytes,
which were read.buffer
- public BufferInputStream(Buffer buffer, int position, int limit)
InputStream
over Grizzly Buffer
.
Constructed BufferInputStream read operations will *not* affect
the passed Buffer
position, which means the passed Buffer
position will never be changed during BufferInputStreambuffer
- public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
Copyright © 2015 Oracle Corporation. All rights reserved.