Package org.apache.http.impl.io
Class DefaultHttpResponseWriter
- java.lang.Object
-
- org.apache.http.impl.io.AbstractMessageWriter<HttpResponse>
-
- org.apache.http.impl.io.DefaultHttpResponseWriter
-
- All Implemented Interfaces:
HttpMessageWriter<HttpResponse>
public class DefaultHttpResponseWriter extends AbstractMessageWriter<HttpResponse>
HTTP response writer that serializes its output to an instance ofSessionOutputBuffer.- Since:
- 4.3
-
-
Field Summary
-
Fields inherited from class org.apache.http.impl.io.AbstractMessageWriter
lineBuf, lineFormatter, sessionBuffer
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpResponseWriter(SessionOutputBuffer buffer)DefaultHttpResponseWriter(SessionOutputBuffer buffer, LineFormatter formatter)Creates an instance of DefaultHttpResponseWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteHeadLine(HttpResponse message)Subclasses must override this method to write out the first header line based on theHttpMessagepassed as a parameter.-
Methods inherited from class org.apache.http.impl.io.AbstractMessageWriter
write
-
-
-
-
Constructor Detail
-
DefaultHttpResponseWriter
public DefaultHttpResponseWriter(SessionOutputBuffer buffer, LineFormatter formatter)
Creates an instance of DefaultHttpResponseWriter.- Parameters:
buffer- the session output buffer.formatter- the line formatter IfnullBasicLineFormatter.INSTANCEwill be used.
-
DefaultHttpResponseWriter
public DefaultHttpResponseWriter(SessionOutputBuffer buffer)
-
-
Method Detail
-
writeHeadLine
protected void writeHeadLine(HttpResponse message) 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<HttpResponse>- Parameters:
message- the message whose first line is to be written out.- Throws:
java.io.IOException- in case of an I/O error.
-
-