Search in sources :

Example 1 with HttpMessage

use of org.apache.http.HttpMessage in project robovm by robovm.

the class AbstractMessageParser method parse.

public HttpMessage parse() throws IOException, HttpException {
    HttpMessage message = null;
    try {
        message = parseHead(this.sessionBuffer);
    } catch (ParseException px) {
        throw new ProtocolException(px.getMessage(), px);
    }
    Header[] headers = AbstractMessageParser.parseHeaders(this.sessionBuffer, this.maxHeaderCount, this.maxLineLen, this.lineParser);
    message.setHeaders(headers);
    return message;
}
Also used : ProtocolException(org.apache.http.ProtocolException) Header(org.apache.http.Header) ParseException(org.apache.http.ParseException) HttpMessage(org.apache.http.HttpMessage)

Example 2 with HttpMessage

use of org.apache.http.HttpMessage in project platform_external_apache-http by android.

the class AbstractMessageParser method parse.

public HttpMessage parse() throws IOException, HttpException {
    HttpMessage message = null;
    try {
        message = parseHead(this.sessionBuffer);
    } catch (ParseException px) {
        throw new ProtocolException(px.getMessage(), px);
    }
    Header[] headers = AbstractMessageParser.parseHeaders(this.sessionBuffer, this.maxHeaderCount, this.maxLineLen, this.lineParser);
    message.setHeaders(headers);
    return message;
}
Also used : ProtocolException(org.apache.http.ProtocolException) Header(org.apache.http.Header) ParseException(org.apache.http.ParseException) HttpMessage(org.apache.http.HttpMessage)

Example 3 with HttpMessage

use of org.apache.http.HttpMessage in project XobotOS by xamarin.

the class AbstractMessageParser method parse.

public HttpMessage parse() throws IOException, HttpException {
    HttpMessage message = null;
    try {
        message = parseHead(this.sessionBuffer);
    } catch (ParseException px) {
        throw new ProtocolException(px.getMessage(), px);
    }
    Header[] headers = AbstractMessageParser.parseHeaders(this.sessionBuffer, this.maxHeaderCount, this.maxLineLen, this.lineParser);
    message.setHeaders(headers);
    return message;
}
Also used : ProtocolException(org.apache.http.ProtocolException) Header(org.apache.http.Header) ParseException(org.apache.http.ParseException) HttpMessage(org.apache.http.HttpMessage)

Aggregations

Header (org.apache.http.Header)3 HttpMessage (org.apache.http.HttpMessage)3 ParseException (org.apache.http.ParseException)3 ProtocolException (org.apache.http.ProtocolException)3