T - The type of HttpMessage.public abstract class AbstractMessageWriter<T extends HttpMessage> extends Object implements HttpMessageWriter<T>
SessionOutputBuffer.| Constructor and Description | 
|---|
| AbstractMessageWriter(LineFormatter formatter)Creates an instance of AbstractMessageWriter. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | write(T message,
     SessionOutputBuffer buffer,
     OutputStream outputStream)Serializes an instance of  MessageHeadersto the given output stream. | 
| protected abstract void | writeHeadLine(T message,
             CharArrayBuffer lineBuf)Subclasses must override this method to write out the first header line
 based on the  HttpMessagepassed as a parameter. | 
public AbstractMessageWriter(LineFormatter formatter)
formatter - the line formatter If null BasicLineFormatter.INSTANCE
   will be used.protected abstract void writeHeadLine(T message, CharArrayBuffer lineBuf) throws IOException
HttpMessage passed as a parameter.message - the message whose first line is to be written out.lineBuf - line bufferIOException - in case of an I/O error.public void write(T message, SessionOutputBuffer buffer, OutputStream outputStream) throws IOException, HttpException
HttpMessageWriterMessageHeaders to the given output stream.write in interface HttpMessageWriter<T extends HttpMessage>message - HTTP message headbuffer - session output bufferIOException - in case of an I/O errorHttpException - in case of HTTP protocol violationCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.