Package org.apache.http.impl.io
Class AbstractMessageWriter<T extends HttpMessage>
- java.lang.Object
-
- org.apache.http.impl.io.AbstractMessageWriter<T>
-
- All Implemented Interfaces:
HttpMessageWriter<T>
- Direct Known Subclasses:
DefaultHttpRequestWriter
,DefaultHttpResponseWriter
,HttpRequestWriter
,HttpResponseWriter
public abstract class AbstractMessageWriter<T extends HttpMessage> extends java.lang.Object implements HttpMessageWriter<T>
Abstract base class for HTTP message writers that serialize output to an instance ofSessionOutputBuffer
.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description AbstractMessageWriter(SessionOutputBuffer buffer, LineFormatter formatter)
Creates an instance of AbstractMessageWriter.AbstractMessageWriter(SessionOutputBuffer buffer, LineFormatter formatter, HttpParams params)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(T message)
Serializes an instance ofHttpMessage
to the underlying data sink.
-
-
-
Constructor Detail
-
AbstractMessageWriter
@Deprecated public AbstractMessageWriter(SessionOutputBuffer buffer, LineFormatter formatter, HttpParams params)
Deprecated.Creates an instance of AbstractMessageWriter.- Parameters:
buffer
- the session output buffer.formatter
- the line formatter.params
- HTTP parameters.
-
AbstractMessageWriter
public AbstractMessageWriter(SessionOutputBuffer buffer, LineFormatter formatter)
Creates an instance of AbstractMessageWriter.- Parameters:
buffer
- the session output buffer.formatter
- the line formatter Ifnull
BasicLineFormatter.INSTANCE
will be used.- Since:
- 4.3
-
-
Method Detail
-
write
public void write(T message) throws java.io.IOException, HttpException
Description copied from interface:HttpMessageWriter
Serializes an instance ofHttpMessage
to the underlying data sink.- Specified by:
write
in interfaceHttpMessageWriter<T extends HttpMessage>
- Parameters:
message
- HTTP message- Throws:
java.io.IOException
- in case of an I/O errorHttpException
- in case of HTTP protocol violation
-
-