JavaScript is disabled on your browser.
javax.servlet.http

Class HttpUtils


  • Deprecated.
    usefull methods have been moved to the request interfaces

    public class HttpUtils
    extends java.lang.Object
    A set of utility methods for http server writers.
    Since:
    1.0
    • Constructor Summary

      Constructors
      Constructor and Description
      HttpUtils ()
      Deprecated.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      static java.lang.StringBuffer getRequestURL (HttpServletRequest request)
      Deprecated.
      static java.util.Hashtable<java.lang.String,java.lang.String[]> parsePostData (int contentLength, ServletInputStream in)
      Deprecated.
      static java.util.Hashtable<java.lang.String,java.lang.String[]> parseQueryString (java.lang.String queryString)
      Deprecated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpUtils

        public HttpUtils()
        Deprecated.
        Creates a HttpUtils object, cool!
    • Method Detail

      • parseQueryString

        public static java.util.Hashtable<java.lang.String,java.lang.String[]> parseQueryString(java.lang.String queryString)
         throws java.lang.IllegalArgumentException
        Deprecated.
        Turns a http QUERY_STRING that conforms to rfc1945("Hypertext Transfer Protocol -- HTTP/1.0") or rfc2068 ("Hypertext Transfer Protocol -- HTTP/1.1") into a Hashtable with key = key and as values arrays of String. Implementation note: when a key or value is missing it will be represented as a zero length string.

        Results:
        ?a=b : key = "a", value = "b"
        ?a : key = "a", value = ""
        ?=b : key = "", value = "b"

        Parameters:
        queryString - The queryString to process
        Returns:
        a Hashtable with String keys, and array of String values.
        Throws:
        java.lang.IllegalArgumentException - If the queryString contains an error it can't handle.
      • parsePostData

        public static java.util.Hashtable<java.lang.String,java.lang.String[]> parsePostData(int contentLength,
         ServletInputStream in)
         throws java.lang.IllegalArgumentException
        Deprecated.
        Reads the data provided by the client using the POST method, passes these on to HttpUtils.parseQueryString for further treatment, and returns the resulting Hashtable.

        bonus:
        When contentLength < 0 it keeps on reading data until EOF
        throws an IllegalArgumentException when contentLength != amount of data in the inputstream

        Returns:
        a Hashtable with String keys, and array of String values.
        Throws:
        java.lang.IllegalArgumentException - If an IO error occurs or the POST data contains an error it can't handle.
        Since:
        1.0
      • getRequestURL

        public static java.lang.StringBuffer getRequestURL(HttpServletRequest request)
        Deprecated.
        Determines which URL the client used when issuing his request. Does not return the querystring (the ?name=value part)
        Returns:
        a URL.
        Since:
        1.0

AltStyle によって変換されたページ (->オリジナル) /