Best code examples for Android CharArrayBuffer class (org.apache.http.util.CharArrayBuffer)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android CharArrayBuffer class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android CharArrayBuffer examples from Open Source projects
This code example shows how to use the following methods: append, toString
This code example shows how to use the following methods: substringTrimmed
    // Protected methods ----------------------------------------------------- 
 
    @Override 
    protected void parseChallenge(final CharArrayBuffer buffer, int beginIndex, int endIndex)
            throws MalformedChallengeException { 
        String challenge = buffer.substringTrimmed(beginIndex, endIndex);
        if (LOGGER.isDebugEnabled()) { 
            LOGGER.debug("Received challenge '" + challenge + "' from the auth server");
        } 
        if (state == State.UNINITIATED) {
            token = new Base64().decode(challenge.getBytes());
            state = State.CHALLENGE_RECEIVED;
        } else { 
            LOGGER.debug("Authentication already attempted"); 
            state = State.FAILED;
        } 
    } 
 
} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: append, toString
     * Generates textual representation of this content type which can be used as the value 
     * of a <code>Content-Type</code> header. 
     */ 
    @Override 
    public String toString() {
        final CharArrayBuffer buf = new CharArrayBuffer(64);
        buf.append(this.mimeType);
        if (this.params != null) {
            buf.append("; ");
            BasicHeaderValueFormatter.INSTANCE.formatParameters(buf, this.params, false);
        } else if (this.charset != null) {
            buf.append("; charset=");
            buf.append(this.charset.name());
        } 
        return buf.toString();
    } 
 
    private static boolean valid(final String s) {
        for (int i = 0; i < s.length(); i++) {
            final char ch = s.charAt(i);
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clear, length
    @Override 
    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);
    } 
 
} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clear, length
    @Override 
    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);
    } 
 
} 
Full Snippet Info
6
CodeRank
Related Android CharArrayBuffer Questions & Answers:
See Code Examples for Android CharArrayBuffer Methods: