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
IOException
public boolean hasData()
hasData
in class org.apache.hc.core5.http.impl.nio.ExpandableBuffer
public int capacity()
capacity
in class org.apache.hc.core5.http.impl.nio.ExpandableBuffer
public int length()
length
in class org.apache.hc.core5.http.impl.nio.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