Android SessionInputBuffer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SessionInputBuffer class.

This code example shows how to use the following methods:readLine
    protected HttpResponse parseHead(
            final SessionInputBuffer sessionBuffer)
        throws IOException, HttpException, ParseException { 
 
        this.lineBuf.clear();
        final int i = sessionBuffer.readLine(this.lineBuf);
        if (i == -1) {
            throw new NoHttpResponseException("The target server failed to respond");
        } 
        //create the status line from the status string 
        final ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
        final StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
        return this.responseFactory.newHttpResponse(statusline, null);
    } 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:readLine
    protected HttpMessage parseHead(
            final SessionInputBuffer sessionBuffer)
        throws IOException, HttpException, ParseException { 
 
        this.lineBuf.clear();
        int i = sessionBuffer.readLine(this.lineBuf);
        if (i == -1) {
            throw new NoHttpResponseException("The target server failed to respond");
        } 
        //create the status line from the status string 
        ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
        StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
        return this.responseFactory.newHttpResponse(statusline, null);
    } 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:readLine
        this.lineBuf.clear();
        //read out the HTTP status string 
        int count = 0;
        ParserCursor cursor = null;
        do { 
            int i = sessionBuffer.readLine(this.lineBuf);
            if (i == -1 && count == 0) {
                // The server just dropped connection on us 
                throw new NoHttpResponseException("The target server failed to respond");
            } 
            cursor = new ParserCursor(0, this.lineBuf.length());
            if (lineParser.hasProtocolVersion(this.lineBuf, cursor)) {
                // Got one 
                break; 
            } else if (i == -1 || count >= this.maxGarbageLines) {
                // Giving up 
                throw new ProtocolException("The server failed to respond with a " +
                        "valid HTTP response"); 
            } 
            count++;
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:readLine
        int count = 0;
        ParserCursor cursor = null;
        do { 
            // clear the buffer 
            this.lineBuf.clear();
            int i = sessionBuffer.readLine(this.lineBuf);
            if (i == -1 && count == 0) {
                // The server just dropped connection on us 
                throw new NoHttpResponseException("The target server failed to respond");
            } 
            cursor = new ParserCursor(0, this.lineBuf.length());
            if (lineParser.hasProtocolVersion(this.lineBuf, cursor)) {
                // Got one 
                break; 
            } else if (i == -1 || reject(this.lineBuf, count)) {
                // Giving up 
                throw new ProtocolException("The server failed to respond with a " +
                        "valid HTTP response"); 
            } 
            if (this.log.isDebugEnabled()) {
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:readLine
    protected HttpResponse parseHead(
            final SessionInputBuffer sessionBuffer)
        throws IOException, HttpException, ParseException { 
 
        this.lineBuf.clear();
        int i = sessionBuffer.readLine(this.lineBuf);
        if (i == -1) {
            throw new NoHttpResponseException("The target server failed to respond");
        } 
        //create the status line from the status string 
        ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
        StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
        return this.responseFactory.newHttpResponse(statusline, null);
    } 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Android SessionInputBuffer Questions & Answers:

See Code Examples for Android SessionInputBuffer Methods: