Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


oracle.security.crypto.util
Class HttpUtils

java.lang.Object
  extended byoracle.security.crypto.util.HttpUtils


public class HttpUtils
extends java.lang.Object

Utility functions for convenience in HTTP processing.


Constructor Summary
HttpUtils()
           

 

Method Summary
static void parseHeaderStream(java.io.InputStream is, java.util.Hashtable headers, java.util.Vector keys)
          Reads HTTP headers from the given input stream, parses them and puts the resulting keys and values into the given Hashtable and Vector objects.
static java.lang.String readCanonicalLine(java.io.InputStream in)
           
static boolean requiresSingleValue(java.lang.String header)
          Checks whether the given HTTP header is required to have at most one value in a single message.
static java.lang.String toTitleCase(java.lang.String s)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

HttpUtils

public HttpUtils()

Method Detail

readCanonicalLine

public static java.lang.String readCanonicalLine(java.io.InputStream in)
                                          throws java.io.IOException
Throws:
java.io.IOException

toTitleCase

public static java.lang.String toTitleCase(java.lang.String s)

parseHeaderStream

public static void parseHeaderStream(java.io.InputStream is,
                                     java.util.Hashtable headers,
                                     java.util.Vector keys)
                              throws java.io.IOException
Reads HTTP headers from the given input stream, parses them and puts the resulting keys and values into the given Hashtable and Vector objects. Multiple headers with the same key will be folded into a single comma-separated value string.
Parameters:
is - An input stream positioned at the beginning of the headers.
headers - A hashtable to contain the parsed header keys and values.
keys - A vector to contain the parsed header keys (to preserve the order of the headers). If null, the order in which the headers were read is lost.
Throws:
java.io.IOException

requiresSingleValue

public static boolean requiresSingleValue(java.lang.String header)
Checks whether the given HTTP header is required to have at most one value in a single message.
Parameters:
header - The string name of the HTTP header to check.
Returns:
true if the given header must have at most one value; false if the header may have more than one value, or if the header is unrecognized.

Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


Copyright © 2005 ,2006 , Oracle. All rights reserved.