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
IOExceptionpublic boolean hasData()
hasData in class org.apache.http.nio.util.ExpandableBufferpublic int available()
available in interface org.apache.http.nio.util.BufferInfoavailable in class org.apache.http.nio.util.ExpandableBufferpublic int capacity()
capacity in interface org.apache.http.nio.util.BufferInfocapacity in class org.apache.http.nio.util.ExpandableBufferpublic int length()
length in interface org.apache.http.nio.util.BufferInfolength in class org.apache.http.nio.util.ExpandableBufferprotected void waitForData(int waitPos)
throws IOException
IOExceptionpublic void close()
public void shutdown()
protected boolean isShutdown()
protected boolean isEndOfStream()
public int read()
throws IOException
IOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic int read(byte[] b)
throws IOException
IOExceptionApache CXF