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.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.ExpandableBufferpublic int produceContent(org.apache.hc.core5.http.nio.DataStreamChannel stream)
throws IOException
IOExceptionpublic void close()
public void shutdown()
public int copy(InputStream in) throws IOException
IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic int write(ByteBuffer b) throws IOException
IOExceptionpublic void write(byte[] b)
throws IOException
IOExceptionpublic void write(int b)
throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic void writeCompleted()
throws IOException
IOExceptionApache CXF