|
XNIO API 3.0.4.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.xnio.streams.BufferPipeInputStream
public class BufferPipeInputStream
An InputStream
implementation which is populated asynchronously with ByteBuffer
instances.
Nested Class Summary | |
---|---|
static interface |
BufferPipeInputStream.InputHandler
A handler for events relating to the consumption of data from a BufferPipeInputStream instance. |
Constructor Summary | |
---|---|
BufferPipeInputStream(BufferPipeInputStream.InputHandler inputHandler)
Construct a new instance. |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
void |
push(ByteBuffer buffer)
Push a buffer into the queue. |
void |
push(Pooled<ByteBuffer> pooledBuffer)
Push a buffer into the queue. |
void |
pushEof()
Push the EOF condition into the queue. |
void |
pushException(IOException e)
Push an exception condition into the queue. |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
long |
skip(long qty)
|
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferPipeInputStream(BufferPipeInputStream.InputHandler inputHandler)
inputHandler
will
be invoked after each buffer is fully read and when the stream is closed.
inputHandler
- the input events handlerMethod Detail |
---|
public void push(ByteBuffer buffer)
Semaphore
.
buffer
- the buffer from which more data should be readpublic void push(Pooled<ByteBuffer> pooledBuffer)
Semaphore
.
pooledBuffer
- the buffer from which more data should be readpublic void pushException(IOException e)
e
- the exception to pushpublic void pushEof()
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 qty) throws IOException
skip
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
|
XNIO API 3.0.4.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |