Code example for SessionOutputBuffer

Methods: flush

     * will invoke {@link #init(SessionInputBuffer, SessionOutputBuffer, HttpParams)} 
     * method to pass references to those buffers to the underlying HTTP message 
     * parser and formatter. 
     * <p> 
     * After this method's execution the connection status will be reported 
     * as open and the {@link #isOpen()} will return <code>true</code>. 
     * @param socket the socket. 
     * @param params HTTP parameters. 
     * @throws IOException in case of an I/O error. 
    protected void bind(final Socket socket, final HttpParams params) throws IOException {
        if (socket == null) {
            throw new IllegalArgumentException("Socket may not be null");
        if (params == null) {
            throw new IllegalArgumentException("HTTP parameters may not be null");
        this.socket = socket;
        int buffersize = HttpConnectionParams.getSocketBufferSize(params);