public abstract class

AbstractMessageWriter

extends Object
implements HttpMessageWriter
java.lang.Object
   ↳ org.apache.http.impl.io.AbstractMessageWriter
Known Direct Subclasses

Class Overview

Abstract base class for HTTP message writers that serialize output to an instance of SessionOutputBuffer.

Summary

Fields
protected final CharArrayBuffer lineBuf
protected final LineFormatter lineFormatter
protected final SessionOutputBuffer sessionBuffer
Public Constructors
AbstractMessageWriter(SessionOutputBuffer buffer, LineFormatter formatter, HttpParams params)
Creates an instance of AbstractMessageWriter.
Public Methods
void write(HttpMessage message)
Serializes an instance of HttpMessage to the underlying data sink.
Protected Methods
abstract void writeHeadLine(HttpMessage message)
Subclasses must override this method to write out the first header line based on the HttpMessage passed as a parameter.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.io.HttpMessageWriter

Fields

protected final CharArrayBuffer lineBuf

protected final LineFormatter lineFormatter

protected final SessionOutputBuffer sessionBuffer

Public Constructors

public AbstractMessageWriter (SessionOutputBuffer buffer, LineFormatter formatter, HttpParams params)

Creates an instance of AbstractMessageWriter.

Parameters
buffer the session output buffer.
formatter the line formatter.
params HTTP parameters.

Public Methods

public void write (HttpMessage message)

Serializes an instance of HttpMessage to the underlying data sink.

Protected Methods

protected abstract void writeHeadLine (HttpMessage message)

Subclasses must override this method to write out the first header line based on the HttpMessage passed as a parameter.

Parameters
message the message whose first line is to be written out.
Throws
IOException in case of an I/O error.