Top Description Constructors Methods
org.apache.hc.core5.http.impl.io

public Class DefaultHttpResponseWriter

extends AbstractMessageWriter<ClassicHttpResponse>
Class Inheritance
Imports
java.io.IOException, org.apache.hc.core5.http.ClassicHttpResponse, .HttpVersion, .ProtocolVersion, org.apache.hc.core5.http.message.LineFormatter, .StatusLine, org.apache.hc.core5.util.CharArrayBuffer

HTTP response writer that serializes its output to an instance of org.apache.hc.core5.http.io.SessionOutputBuffer.
Since
4.3

Constructor Summary

AccessConstructor and Description
public
DefaultHttpResponseWriter(final LineFormatter
the line formatter If null org.apache.hc.core5.http.message.BasicLineFormatter#INSTANCE will be used.
formatter
)

Creates an instance of DefaultHttpResponseWriter.

public

Method Summary

Modifier and TypeMethod and Description
protected void
writeHeadLine(final ClassicHttpResponse
the message whose first line is to be written out.
message
,
final CharArrayBuffer
line buffer
lineBuf
)

Implements abstract org.apache.hc.core5.http.impl.io.AbstractMessageWriter.writeHeadLine.

Subclasses must override this method to write out the first header line based on the HttpMessage passed as a parameter.
Inherited from org.apache.hc.core5.http.impl.io.AbstractMessageWriter:
getLineFormatterwrite

Constructor Detail

DefaultHttpResponseWriterback to summary
public DefaultHttpResponseWriter(final LineFormatter formatter)

Creates an instance of DefaultHttpResponseWriter.

Parameters
formatter:LineFormatter

the line formatter If null org.apache.hc.core5.http.message.BasicLineFormatter#INSTANCE will be used.

DefaultHttpResponseWriterback to summary
public DefaultHttpResponseWriter()

Method Detail

writeHeadLineback to summary
protected void writeHeadLine(final ClassicHttpResponse message, final CharArrayBuffer lineBuf) throws IOException

Implements abstract org.apache.hc.core5.http.impl.io.AbstractMessageWriter.writeHeadLine.

Doc from org.apache.hc.core5.http.impl.io.AbstractMessageWriter.writeHeadLine.

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

Parameters
message:ClassicHttpResponse

the message whose first line is to be written out.

lineBuf:CharArrayBuffer

line buffer

Annotations
@Override
Exceptions
IOException:
in case of an I/O error.