Package org.apache.http.message

Examples of org.apache.http.message.BufferedHeader


        }
        if (this.state == COMPLETED) {
            for (int i = 0; i < this.headerBufs.size(); i++) {
                CharArrayBuffer buffer = (CharArrayBuffer) this.headerBufs.get(i);
                try {
                    this.message.addHeader(new BufferedHeader(buffer));
                } catch (IllegalArgumentException ex) {
                    throw new ProtocolException(ex.getMessage());
                }
            }
            return this.message;
View Full Code Here


        if (count > 0) {
            this.footers = new Header[this.trailerBufs.size()];
            for (int i = 0; i < this.trailerBufs.size(); i++) {
                CharArrayBuffer buffer = (CharArrayBuffer) this.trailerBufs.get(i);
                try {
                    this.footers[i] = new BufferedHeader(buffer);
                } catch (IllegalArgumentException ex) {
                    throw new IOException(ex.getMessage());
                }
            }
        }
View Full Code Here

            } else {
                buffer.append(AUTH.WWW_AUTH_RESP);
            }
            buffer.append(": Negotiate ");
            buffer.append(tokenstr);
            return new BufferedHeader(buffer);
        } catch (GSSException gsse) {
            state = State.FAILED;
            if (gsse.getMajor() == GSSException.DEFECTIVE_CREDENTIAL || gsse.getMajor() == GSSException.CREDENTIALS_EXPIRED)
                throw new InvalidCredentialsException(gsse.getMessage(), gsse);
            if (gsse.getMajor() == GSSException.NO_CRED)
View Full Code Here

            fail("IllegalArgumentException should have been thrown");
        } catch (IllegalArgumentException ex) {
            // expected
        }
        try {
            new BufferedHeader(null);
            fail("IllegalArgumentException should have been thrown");
        } catch (IllegalArgumentException ex) {
            // expected
        }
    }
View Full Code Here

            buffer1.append(HTTPConstants.HEADER_SET_COOKIE);
            buffer1.append(": ");
            buffer1.append(Constants.SESSION_COOKIE_JSESSIONID);
            buffer1.append("=");
            buffer1.append(sessionCookie);
            response.addHeader(new BufferedHeader(buffer1));

            // Generate RFC2965 cookie2 header
            CharArrayBuffer buffer2 = new CharArrayBuffer(sessionCookie.length() + 50);
            buffer2.append(HTTPConstants.HEADER_SET_COOKIE2);
            buffer2.append(": ");
            buffer2.append(Constants.SESSION_COOKIE_JSESSIONID);
            buffer2.append("=");
            buffer2.append(sessionCookie);
            buffer2.append("; ");
            int port = response.getParams().getIntParameter(AxisParams.LISTENER_PORT, 0);
            if (port > 0) {
                buffer2.append("Port=\"");
                buffer2.append(Integer.toString(port));
                buffer2.append("\"; ");
            }
            buffer2.append("Version=1");
            response.addHeader(new BufferedHeader(buffer2));
        }
    }
View Full Code Here

        if (count > 0) {
            this.footers = new Header[this.trailerBufs.size()];
            for (int i = 0; i < this.trailerBufs.size(); i++) {
                CharArrayBuffer buffer = this.trailerBufs.get(i);
                try {
                    this.footers[i] = new BufferedHeader(buffer);
                } catch (ParseException ex) {
                    throw new IOException(ex.getMessage());
                }
            }
        }
View Full Code Here

            buffer.append(AUTH.WWW_AUTH_RESP);
        }
        buffer.append(": Basic ");
        buffer.append(base64password, 0, base64password.length);

        return new BufferedHeader(buffer);
    }
View Full Code Here

                buffer.append(", ");
            }
            boolean noQuotes = "nc".equals(param.getName()) || "qop".equals(param.getName());
            BasicHeaderValueFormatter.DEFAULT.formatNameValuePair(buffer, param, !noQuotes);
        }
        return new BufferedHeader(buffer);
    }
View Full Code Here

            if (s != null) {
                buffer.append(s);
            }
        }
        List<Header> headers = new ArrayList<Header>(1);
        headers.add(new BufferedHeader(buffer));
        return headers;
    }
View Full Code Here

            fail("IllegalArgumentException should have been thrown");
        } catch (IllegalArgumentException ex) {
            // expected
        }
        try {
            new BufferedHeader(null);
            fail("IllegalArgumentException should have been thrown");
        } catch (IllegalArgumentException ex) {
            // expected
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.http.message.BufferedHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.