Class AbstractMessageWriter<T extends org.apache.http.HttpMessage>

    • Field Detail

      • lineBuf

        protected final org.apache.http.util.CharArrayBuffer lineBuf
      • lineFormatter

        protected final org.apache.http.message.LineFormatter lineFormatter
    • Constructor Detail

      • AbstractMessageWriter

        @Deprecated
        public AbstractMessageWriter​(SessionOutputBuffer buffer,
                                     org.apache.http.message.LineFormatter formatter,
                                     org.apache.http.params.HttpParams params)
        Creates an instance of this class.
        Parameters:
        buffer - the session output buffer.
        formatter - the line formatter.
        params - HTTP parameters.
      • AbstractMessageWriter

        public AbstractMessageWriter​(SessionOutputBuffer buffer,
                                     org.apache.http.message.LineFormatter formatter)
        Creates an instance of AbstractMessageWriter.
        Parameters:
        buffer - the session output buffer.
        formatter - the line formatter If null BasicLineFormatter.INSTANCE will be used.
        Since:
        4.3
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: NHttpMessageWriter
        Resets the writer. The writer will be ready to start serializing another HTTP message.
        Specified by:
        reset in interface NHttpMessageWriter<T extends org.apache.http.HttpMessage>
      • writeHeadLine

        protected abstract void writeHeadLine​(T message)
                                       throws java.io.IOException
        Writes out the first line of HttpMessage.
        Parameters:
        message - HTTP message.
        Throws:
        java.io.IOException
      • write

        public void write​(T message)
                   throws java.io.IOException,
                          org.apache.http.HttpException
        Description copied from interface: NHttpMessageWriter
        Serializes out the HTTP message head.
        Specified by:
        write in interface NHttpMessageWriter<T extends org.apache.http.HttpMessage>
        Parameters:
        message - HTTP message.
        Throws:
        java.io.IOException - in case of an I/O error.
        org.apache.http.HttpException - in case the HTTP message is malformed or violates the HTTP protocol.