T - The type of HttpMessage.public abstract class AbstractMessageWriter<T extends HttpMessage> extends Object implements NHttpMessageWriter<T>
NHttpMessageWriter that serves as a base for all message
 writer implementations.| Constructor and Description | 
|---|
| AbstractMessageWriter(LineFormatter formatter)Creates an instance of AbstractMessageWriter. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | reset()Resets the writer. | 
| void | write(T message,
     SessionOutputBuffer sessionBuffer)Writes out the HTTP message head. | 
| protected abstract void | writeHeadLine(T message,
             CharArrayBuffer buffer)Writes out the first line of  HttpMessage. | 
public AbstractMessageWriter(LineFormatter formatter)
formatter - the line formatter If null BasicLineFormatter.INSTANCE
   will be used.public void reset()
NHttpMessageWriterreset in interface NHttpMessageWriter<T extends HttpMessage>protected abstract void writeHeadLine(T message, CharArrayBuffer buffer) throws IOException
HttpMessage.message - HTTP message.IOException - in case of an I/O error.public void write(T message, SessionOutputBuffer sessionBuffer) throws IOException, HttpException
NHttpMessageWriterwrite in interface NHttpMessageWriter<T extends HttpMessage>message - HTTP message.sessionBuffer - session output buffer.IOException - in case of an I/O error.HttpException - in case the HTTP message is malformed or
  violates the HTTP protocol.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.