net.kano.joscar
Class OscarTools.HttpHeaderInfo

java.lang.Object
  extended bynet.kano.joscar.OscarTools.HttpHeaderInfo
Enclosing class:
OscarTools

public static final class OscarTools.HttpHeaderInfo
extends java.lang.Object

A structure containing HTTP header information along with the binary data sent in the HTTP stream.


Method Summary
 java.lang.String get(java.lang.String headerName)
          Returns the value of the header with the given name.
 ByteBlock getData()
          Returns the block of data sent in the associated HTTP stream.
 java.util.Map getHeaders()
          Returns an immutable Map that contains the HTTP header names as keys and the associated header values as values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public java.lang.String get(java.lang.String headerName)
Returns the value of the header with the given name.

Parameters:
headerName - the name of the header to retrieve, like "content-type"
Returns:
the value of the given header, or null if the given header was not sent in the associated HTTP stream

getHeaders

public java.util.Map getHeaders()
Returns an immutable Map that contains the HTTP header names as keys and the associated header values as values. See OscarTools.parseHttpHeader(ByteBlock) for details.

Returns:
a map from HTTP header names to their values

getData

public ByteBlock getData()
Returns the block of data sent in the associated HTTP stream.

Returns:
the block of data sent after the headers in the HTTP stream from which this object was created