public class SharedInputBuffer
extends org.apache.hc.core5.http.impl.nio.ExpandableBuffer
ByteBuffer to the buffer
by calling consumeContent(ByteBuffer).
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) |
| Modifier and Type | Method and Description |
|---|---|
int |
capacity() |
void |
close() |
int |
consumeContent(ByteBuffer buffer) |
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 void reset()
public int consumeContent(ByteBuffer buffer) throws IOException
IOExceptionpublic boolean hasData()
hasData in class org.apache.hc.core5.http.impl.nio.ExpandableBufferpublic int capacity()
capacity in class org.apache.hc.core5.http.impl.nio.ExpandableBufferpublic int length()
length in class org.apache.hc.core5.http.impl.nio.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