public class SharedOutputBuffer
extends org.apache.hc.core5.http.impl.nio.ExpandableBuffer
DataStreamChannel
by calling produceContent(DataStreamChannel)
.
The worker thread is expected to write data to the buffer by calling
write(int)
, write(byte[], int, int)
or writeCompleted()
In case of an abnormal situation or when no longer needed the buffer must be
shut down using shutdown()
method.Constructor and Description |
---|
SharedOutputBuffer(int buffersize) |
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
void |
close() |
int |
copy(InputStream in) |
void |
flush() |
boolean |
hasData() |
int |
length() |
int |
produceContent(org.apache.hc.core5.http.nio.DataStreamChannel stream) |
void |
reset() |
void |
shutdown() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
int |
write(ByteBuffer b) |
void |
write(int b) |
void |
writeCompleted() |
public void reset()
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
public int produceContent(org.apache.hc.core5.http.nio.DataStreamChannel stream) throws IOException
IOException
public void close()
public void shutdown()
public int copy(InputStream in) throws IOException
IOException
public void write(byte[] b, int off, int len) throws IOException
IOException
public int write(ByteBuffer b) throws IOException
IOException
public void write(byte[] b) throws IOException
IOException
public void write(int b) throws IOException
IOException
public void flush() throws IOException
IOException
public void writeCompleted() throws IOException
IOException
Apache CXF