public class Pipe extends Object
Constructor and Description |
---|
Pipe(ControlledByteBuffer buffer,
String name,
BaseConfiguration baseConfig) |
Pipe(org.apache.http.nio.IOControl producerIoControl,
ControlledByteBuffer buffer,
String name,
BaseConfiguration baseConfig) |
Modifier and Type | Method and Description |
---|---|
void |
attachConsumer(org.apache.http.nio.IOControl consumerIoControl)
Set the consumers IOControl
|
int |
consume(org.apache.http.nio.ContentEncoder encoder)
Consume the data from the buffer.
|
void |
consumerError() |
ControlledByteBuffer |
getBuffer() |
InputStream |
getInputStream()
Creates an InputStream object on the underlying ByteBuffer.
|
OutputStream |
getOutputStream()
Creates a separate ByteBuffer for the output data and returns an OutputStream
on top of it.
|
boolean |
isSerializationComplete() |
int |
produce(org.apache.http.nio.ContentDecoder decoder)
Produce data in to the buffer.
|
void |
producerError() |
void |
setRawSerializationComplete(boolean rawSerializationComplete) |
void |
setSerializationComplete(boolean serializationComplete) |
void |
setSerializationCompleteWithoutData(boolean serializationComplete) |
String |
toString() |
public Pipe(org.apache.http.nio.IOControl producerIoControl, ControlledByteBuffer buffer, String name, BaseConfiguration baseConfig)
public Pipe(ControlledByteBuffer buffer, String name, BaseConfiguration baseConfig)
public void attachConsumer(org.apache.http.nio.IOControl consumerIoControl)
consumerIoControl
- IOControl of the consumerpublic int consume(org.apache.http.nio.ContentEncoder encoder) throws IOException
encoder
- encoder used to write the data means there will not be any data
written in to this bufferIOException
- if an error occurred while consuming datapublic int produce(org.apache.http.nio.ContentDecoder decoder) throws IOException
decoder
- decoder to read bytes from the underlying streamIOException
- if an error occurs while reading datapublic void consumerError()
public void producerError()
public InputStream getInputStream()
public OutputStream getOutputStream()
public void setSerializationComplete(boolean serializationComplete)
public void setSerializationCompleteWithoutData(boolean serializationComplete)
public void setRawSerializationComplete(boolean rawSerializationComplete)
public ControlledByteBuffer getBuffer()
public boolean isSerializationComplete()
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.