Code example for RequestLine

Methods: getMethodgetProtocolVersiongetUri

0
     *                  never <code>null</code> 
     * @param reqline   the request line to format, never <code>null</code> 
     */ 
    protected void doFormatRequestLine(final CharArrayBuffer buffer,
                                       final RequestLine reqline) {
        final String method = reqline.getMethod();
        final String uri    = reqline.getUri();
 
        // room for "GET /index.html HTTP/1.1" 
        int len = method.length() + 1 + uri.length() + 1 +
            estimateProtocolVersionLen(reqline.getProtocolVersion());
        buffer.ensureCapacity(len);
 
        buffer.append(method);
        buffer.append(' ');
        buffer.append(uri);
        buffer.append(' ');
        appendProtocolVersion(buffer, reqline.getProtocolVersion());
    } 
 
 
 
    /** 
Experience pair programming with AI  Get Codota for Java