org.archive.wayback.util.http
Class HttpMessage

java.lang.Object
  extended by org.archive.wayback.util.http.HttpMessage
Direct Known Subclasses:
HttpRequestMessage, HttpResponseMessage

public class HttpMessage
extends Object

Version:
$Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
Author:
brad

Field Summary
static byte CR
           
static byte LF
           
static byte SPACE
           
 
Constructor Summary
HttpMessage()
           
 
Method Summary
 byte[] concatBytes(byte[][] fields, boolean addCrLf)
           
static byte[][] loadFields(byte[] buffer, int max)
           
static HttpRequestMessage loadRequest(byte[] buffer)
           
static HttpRequestMessage loadRequest(InputStream in)
           
static HttpResponseMessage loadResponse(byte[] buffer)
           
static HttpResponseMessage loadResponse(InputStream in)
           
static byte[] readLine(InputStream in, int max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPACE

public static byte SPACE

CR

public static byte CR

LF

public static byte LF
Constructor Detail

HttpMessage

public HttpMessage()
Method Detail

readLine

public static byte[] readLine(InputStream in,
                              int max)
                       throws IOException,
                              BadRequestException
Throws:
IOException
BadRequestException

loadFields

public static byte[][] loadFields(byte[] buffer,
                                  int max)
                           throws BadRequestException
Throws:
BadRequestException

concatBytes

public byte[] concatBytes(byte[][] fields,
                          boolean addCrLf)

loadResponse

public static HttpResponseMessage loadResponse(byte[] buffer)
                                        throws BadRequestException
Throws:
BadRequestException

loadResponse

public static HttpResponseMessage loadResponse(InputStream in)
                                        throws BadRequestException,
                                               IOException
Throws:
BadRequestException
IOException

loadRequest

public static HttpRequestMessage loadRequest(byte[] buffer)
                                      throws BadRequestException
Throws:
BadRequestException

loadRequest

public static HttpRequestMessage loadRequest(InputStream in)
                                      throws BadRequestException,
                                             IOException
Throws:
BadRequestException
IOException


Copyright © 2005-2011 Internet Archive. All Rights Reserved.