List of usage examples for org.apache.http.impl.io HttpRequestWriter HttpRequestWriter
public HttpRequestWriter(SessionOutputBuffer sessionOutputBuffer, LineFormatter lineFormatter,
HttpParams httpParams)
From source file:com.subgraph.vega.internal.http.requests.connection.UnencodingClientConnection.java
@Override protected HttpMessageWriter createRequestWriter(final SessionOutputBuffer buffer, final HttpParams params) { return new HttpRequestWriter(buffer, new UnencodingLineFormatter(), params); }
From source file:com.subgraph.vega.internal.http.requests.connection.BasicClientConnection.java
@Override protected HttpMessageWriter createRequestWriter(final SessionOutputBuffer buffer, final HttpParams params) { return new HttpRequestWriter(buffer, new BasicLineFormatter(), params); }
From source file:net.oneandone.sushi.fs.webdav.WebdavConnection.java
public WebdavConnection(Socket socket, SessionInputBuffer input, SessionOutputBuffer output, HttpParams params) {/*from w w w . j av a 2 s . com*/ this.socket = socket; this.entityserializer = new EntitySerializer(new StrictContentLengthStrategy()); this.entitydeserializer = new EntityDeserializer(new LaxContentLengthStrategy()); this.input = input; this.output = output; this.responseParser = new DefaultHttpResponseParser(input, null, new DefaultHttpResponseFactory(), params); this.requestWriter = new HttpRequestWriter(output, null, params); this.metrics = new HttpConnectionMetricsImpl(input.getMetrics(), output.getMetrics()); this.open = true; }
From source file:org.mycard.net.network.AndroidHttpClientConnection.java
/*** * Bind socket and set HttpParams to AndroidHttpClientConnection * @param socket outgoing socket//from w ww.j a v a 2 s. co m * @param params HttpParams * @throws IOException */ public 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"); } assertNotOpen(); socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(params)); socket.setSoTimeout(HttpConnectionParams.getSoTimeout(params)); int linger = HttpConnectionParams.getLinger(params); if (linger >= 0) { socket.setSoLinger(linger > 0, linger); } this.socket = socket; int buffersize = HttpConnectionParams.getSocketBufferSize(params); this.inbuffer = new SocketInputBuffer(socket, buffersize, params); this.outbuffer = new SocketOutputBuffer(socket, buffersize, params); maxHeaderCount = params.getIntParameter(CoreConnectionPNames.MAX_HEADER_COUNT, -1); maxLineLength = params.getIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, -1); this.requestWriter = new HttpRequestWriter(outbuffer, null, params); this.metrics = new HttpConnectionMetricsImpl(inbuffer.getMetrics(), outbuffer.getMetrics()); this.open = true; }