public class SharedInputBuffer
extends org.apache.http.nio.util.ExpandableBuffer
ContentDecoder
to the buffer
by calling #consumeContent(ContentDecoder)
.
The worker thread is expected to read the data from the buffer by calling
read()
or read(byte[], int, int)
methods.
In case of an abnormal situation or when no longer needed the buffer must be shut down
using shutdown()
method.Constructor and Description |
---|
SharedInputBuffer(int buffersize,
org.apache.http.nio.util.ByteBufferAllocator allocator) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
int |
capacity() |
void |
close() |
int |
consumeContent(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioc) |
boolean |
hasData() |
protected boolean |
isEndOfStream() |
protected boolean |
isShutdown() |
int |
length() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
shutdown() |
protected void |
waitForData(int waitPos) |
public SharedInputBuffer(int buffersize, org.apache.http.nio.util.ByteBufferAllocator allocator)
public void reset()
public int consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioc) throws IOException
IOException
public boolean hasData()
hasData
in class org.apache.http.nio.util.ExpandableBuffer
public int available()
available
in interface org.apache.http.nio.util.BufferInfo
available
in class org.apache.http.nio.util.ExpandableBuffer
public int capacity()
capacity
in interface org.apache.http.nio.util.BufferInfo
capacity
in class org.apache.http.nio.util.ExpandableBuffer
public int length()
length
in interface org.apache.http.nio.util.BufferInfo
length
in class org.apache.http.nio.util.ExpandableBuffer
protected void waitForData(int waitPos) throws IOException
IOException
public void close()
public void shutdown()
protected boolean isShutdown()
protected boolean isEndOfStream()
public int read() throws IOException
IOException
public int read(byte[] b, int off, int len) throws IOException
IOException
public int read(byte[] b) throws IOException
IOException
Apache CXF