public abstract class

AbstractMessageWriter

extends Object
implements NHttpMessageWriter<T extends HttpMessage>
java.lang.Object
   ↳ org.apache.http.impl.nio.codecs.AbstractMessageWriter<T extends org.apache.http.HttpMessage>
Known Direct Subclasses

Class Overview

Abstract NHttpMessageWriter that serves as a base for all message writer implementations.

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 this class.
Public Methods
void reset()
Resets the writer.
void write(T message)
Serializes out the HTTP message head.
Protected Methods
abstract void writeHeadLine(T message)
Writes out the first line of HttpMessage.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.nio.NHttpMessageWriter

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 this class.

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

Public Methods

public void reset ()

Resets the writer. The writer will be ready to start serializing another HTTP message.

public void write (T message)

Serializes out the HTTP message head.

Parameters
message HTTP message.
Throws
HttpException
IOException

Protected Methods

protected abstract void writeHeadLine (T message)

Writes out the first line of HttpMessage.

Parameters
message HTTP message.
Throws
HttpException in case of HTTP protocol violation
IOException