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

public Class DefaultHttpRequestWriter

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

HTTP request 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
DefaultHttpRequestWriter(final LineFormatter
the line formatter If null org.apache.hc.core5.http.message.BasicLineFormatter#INSTANCE will be used.
formatter
)

Creates an instance of DefaultHttpRequestWriter.

public

Method Summary

Modifier and TypeMethod and Description
protected void
writeHeadLine(final ClassicHttpRequest
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

DefaultHttpRequestWriterback to summary
public DefaultHttpRequestWriter(final LineFormatter formatter)

Creates an instance of DefaultHttpRequestWriter.

Parameters
formatter:LineFormatter

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

DefaultHttpRequestWriterback to summary
public DefaultHttpRequestWriter()

Method Detail

writeHeadLineback to summary
protected void writeHeadLine(final ClassicHttpRequest 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:ClassicHttpRequest

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.