|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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 handler| Method 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 InputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException
public int available()
throws IOException
available in class InputStreamIOException
public long skip(long qty)
throws IOException
skip in class InputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||