Package org.apache.hc.core5.http.impl.io
Class DefaultHttpResponseWriter
- java.lang.Object
-
- org.apache.hc.core5.http.impl.io.AbstractMessageWriter<ClassicHttpResponse>
-
- org.apache.hc.core5.http.impl.io.DefaultHttpResponseWriter
-
- All Implemented Interfaces:
HttpMessageWriter<ClassicHttpResponse>
public class DefaultHttpResponseWriter extends AbstractMessageWriter<ClassicHttpResponse>
HTTP response writer that serializes its output to an instance ofSessionOutputBuffer.- Since:
- 4.3
-
-
Field Summary
Fields Modifier and Type Field Description private Http1Confighttp1Config
-
Constructor Summary
Constructors Constructor Description DefaultHttpResponseWriter()DefaultHttpResponseWriter(Http1Config http1Config, LineFormatter formatter)DefaultHttpResponseWriter(LineFormatter formatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpVersionprotocolVersion(HttpResponse message)Determines the HTTP protocol version to be communicated to the opposite endpoint in the message header.protected voidwriteHeadLine(ClassicHttpResponse message, CharArrayBuffer lineBuf)Subclasses must override this method to write out the first header line based on theHttpMessagepassed as a parameter.-
Methods inherited from class org.apache.hc.core5.http.impl.io.AbstractMessageWriter
getLineFormatter, write
-
-
-
-
Field Detail
-
http1Config
private final Http1Config http1Config
-
-
Constructor Detail
-
DefaultHttpResponseWriter
public DefaultHttpResponseWriter(Http1Config http1Config, LineFormatter formatter)
- Since:
- 5.3
-
DefaultHttpResponseWriter
public DefaultHttpResponseWriter(LineFormatter formatter)
-
DefaultHttpResponseWriter
public DefaultHttpResponseWriter()
-
-
Method Detail
-
protocolVersion
protected HttpVersion protocolVersion(HttpResponse message)
Determines the HTTP protocol version to be communicated to the opposite endpoint in the message header.- Since:
- 5.3
-
writeHeadLine
protected void writeHeadLine(ClassicHttpResponse message, CharArrayBuffer lineBuf) throws java.io.IOException
Description copied from class:AbstractMessageWriterSubclasses must override this method to write out the first header line based on theHttpMessagepassed as a parameter.- Specified by:
writeHeadLinein classAbstractMessageWriter<ClassicHttpResponse>- Parameters:
message- the message whose first line is to be written out.lineBuf- line buffer- Throws:
java.io.IOException- in case of an I/O error.
-
-