JavaScript is disabled on your browser.
gnu.inet.http

Class Response



  • public class Response
    extends java.lang.Object
    An HTTP response.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected int code
      The HTTP status code of the response.
      protected int codeClass
      The class of the response.
      protected Headers headers
      The response headers.
      protected int majorVersion
      The HTTP major version of the server issuing the response.
      protected java.lang.String message
      Human-readable text of the response.
      protected int minorVersion
      The HTTP minor version of the server issuing the response.
    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected Response (int majorVersion, int minorVersion, int code, int codeClass, java.lang.String message, Headers headers)
      Constructs a new response with the specified parameters.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      int getCode ()
      Returns the HTTP status code of the response.
      int getCodeClass ()
      Returns the class of the response.
      java.util.Date getDateHeader (java.lang.String name)
      Returns the header value for the specified name as a date.
      java.lang.String getHeader (java.lang.String name)
      Returns the header value for the specified name.
      Headers getHeaders ()
      Returns the headers in the response.
      int getIntHeader (java.lang.String name)
      Returns the header value for the specified name as an integer.
      int getMajorVersion ()
      Returns the HTTP major version of the server issuing the response.
      java.lang.String getMessage ()
      Returns the human-readable text of the response.
      int getMinorVersion ()
      Returns the HTTP minor version of the server issuing the response.
      • Methods inherited from class java.lang.Object

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

      • majorVersion

        protected final int majorVersion
        The HTTP major version of the server issuing the response.
      • minorVersion

        protected final int minorVersion
        The HTTP minor version of the server issuing the response.
      • code

        protected final int code
        The HTTP status code of the response.
      • codeClass

        protected final int codeClass
        The class of the response. This is the most significant digit of the status code.
        1xx
        Informational response
        2xx
        Success
        3xx
        Redirection
        4xx
        Client error
        5xx
        Server error
      • message

        protected final java.lang.String message
        Human-readable text of the response.
      • headers

        protected final Headers headers
        The response headers.
    • Constructor Detail

      • Response

        protected Response(int majorVersion,
         int minorVersion,
         int code,
         int codeClass,
         java.lang.String message,
         Headers headers)
        Constructs a new response with the specified parameters.
    • Method Detail

      • getMajorVersion

        public int getMajorVersion()
        Returns the HTTP major version of the server issuing the response.
        See Also:
        majorVersion
      • getMinorVersion

        public int getMinorVersion()
        Returns the HTTP minor version of the server issuing the response.
        See Also:
        minorVersion
      • getCode

        public int getCode()
        Returns the HTTP status code of the response.
        See Also:
        code
      • getCodeClass

        public int getCodeClass()
        Returns the class of the response.
        See Also:
        codeClass
      • getMessage

        public java.lang.String getMessage()
        Returns the human-readable text of the response.
        See Also:
        message
      • getHeaders

        public Headers getHeaders()
        Returns the headers in the response.
      • getHeader

        public java.lang.String getHeader(java.lang.String name)
        Returns the header value for the specified name.
        Parameters:
        name - the header name
      • getIntHeader

        public int getIntHeader(java.lang.String name)
        Returns the header value for the specified name as an integer.
        Parameters:
        name - the header name
      • getDateHeader

        public java.util.Date getDateHeader(java.lang.String name)
        Returns the header value for the specified name as a date.
        Parameters:
        name - the header name

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