protected HttpRequest receiveRequestLine(final HttpParams params)
throws HttpException, IOException {
this.buffer.clear();
int i = this.datareceiver.readLine(this.buffer);
if (i == -1) {
throw new ConnectionClosedException("Client closed connection");
}
RequestLine requestline = RequestLine.parse(this.buffer, 0, this.buffer.length());
HttpRequest request = this.requestfactory.newHttpRequest(requestline);
request.getParams().setDefaults(params);
return request;