org.apache.http.impl.io
Class DefaultHttpResponseWriter

java.lang.Object
  extended by org.apache.http.impl.io.AbstractMessageWriterHC4
      extended by org.apache.http.impl.io.DefaultHttpResponseWriter
All Implemented Interfaces:
org.apache.http.io.HttpMessageWriter

@NotThreadSafe
public class DefaultHttpResponseWriter
extends AbstractMessageWriterHC4

HTTP response writer that serializes its output to an instance of SessionOutputBuffer.

Since:
4.3

Field Summary
 
Fields inherited from class org.apache.http.impl.io.AbstractMessageWriterHC4
lineBuf, lineFormatter, sessionBuffer
 
Constructor Summary
DefaultHttpResponseWriter(org.apache.http.io.SessionOutputBuffer buffer)
           
DefaultHttpResponseWriter(org.apache.http.io.SessionOutputBuffer buffer, org.apache.http.message.LineFormatter formatter)
          Creates an instance of DefaultHttpResponseWriter.
 
Method Summary
protected  void writeHeadLine(org.apache.http.HttpMessage message)
          Subclasses must override this method to write out the first header line based on the HttpMessage passed as a parameter.
 
Methods inherited from class org.apache.http.impl.io.AbstractMessageWriterHC4
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpResponseWriter

public DefaultHttpResponseWriter(org.apache.http.io.SessionOutputBuffer buffer,
                                 org.apache.http.message.LineFormatter formatter)
Creates an instance of DefaultHttpResponseWriter.

Parameters:
buffer - the session output buffer.
formatter - the line formatter If null BasicLineFormatterHC4.INSTANCE will be used.

DefaultHttpResponseWriter

public DefaultHttpResponseWriter(org.apache.http.io.SessionOutputBuffer buffer)
Method Detail

writeHeadLine

protected void writeHeadLine(org.apache.http.HttpMessage message)
                      throws java.io.IOException
Description copied from class: AbstractMessageWriterHC4
Subclasses must override this method to write out the first header line based on the HttpMessage passed as a parameter.

Specified by:
writeHeadLine in class AbstractMessageWriterHC4
Parameters:
message - the message whose first line is to be written out.
Throws:
java.io.IOException - in case of an I/O error.