/[classpath]/inetlib/source/gnu/inet/http/Response.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/http/Response.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dog, Thu Oct 21 15:21:55 2004 UTC revision 1.4 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * Response.java
3   * Copyright (C) 2004 The Free Software Foundation   * Copyright (C) 2004 The Free Software Foundation
4   *   *
5   * This file is part of GNU inetlib, a library.   * This file is part of GNU inetlib, a library.
# Line 89  public class Response Line 89  public class Response
89    /**    /**
90     * Constructs a new response with the specified parameters.     * Constructs a new response with the specified parameters.
91     */     */
92    protected Response (int majorVersion, int minorVersion, int code,    protected Response(int majorVersion, int minorVersion, int code,
93                        int codeClass, String message,                       int codeClass, String message,
94                        Headers headers)                       Headers headers)
95    {    {
96      this.majorVersion = majorVersion;      this.majorVersion = majorVersion;
97      this.minorVersion = minorVersion;      this.minorVersion = minorVersion;
# Line 105  public class Response Line 105  public class Response
105     * Returns the HTTP major version of the server issuing the response.     * Returns the HTTP major version of the server issuing the response.
106     * @see #majorVersion     * @see #majorVersion
107     */     */
108    public int getMajorVersion ()    public int getMajorVersion()
109    {    {
110      return majorVersion;      return majorVersion;
111    }    }
# Line 114  public class Response Line 114  public class Response
114     * Returns the HTTP minor version of the server issuing the response.     * Returns the HTTP minor version of the server issuing the response.
115     * @see #minorVersion     * @see #minorVersion
116     */     */
117    public int getMinorVersion ()    public int getMinorVersion()
118    {    {
119      return minorVersion;      return minorVersion;
120    }    }
# Line 123  public class Response Line 123  public class Response
123     * Returns the HTTP status code of the response.     * Returns the HTTP status code of the response.
124     * @see #code     * @see #code
125     */     */
126    public int getCode ()    public int getCode()
127    {    {
128      return code;      return code;
129    }    }
# Line 132  public class Response Line 132  public class Response
132     * Returns the class of the response.     * Returns the class of the response.
133     * @see #codeClass     * @see #codeClass
134     */     */
135    public int getCodeClass ()    public int getCodeClass()
136    {    {
137      return codeClass;      return codeClass;
138    }    }
# Line 141  public class Response Line 141  public class Response
141     * Returns the human-readable text of the response.     * Returns the human-readable text of the response.
142     * @see #message     * @see #message
143     */     */
144    public String getMessage ()    public String getMessage()
145    {    {
146      return message;      return message;
147    }    }
# Line 149  public class Response Line 149  public class Response
149    /**    /**
150     * Returns the headers in the response.     * Returns the headers in the response.
151     */     */
152    public Headers getHeaders ()    public Headers getHeaders()
153    {    {
154      return headers;      return headers;
155    }    }
# Line 158  public class Response Line 158  public class Response
158     * Returns the header value for the specified name.     * Returns the header value for the specified name.
159     * @param name the header name     * @param name the header name
160     */     */
161    public String getHeader (String name)    public String getHeader(String name)
162    {    {
163      return headers.getValue (name);      return headers.getValue(name);
164    }    }
165    
166    /**    /**
167     * Returns the header value for the specified name as an integer.     * Returns the header value for the specified name as an integer.
168     * @param name the header name     * @param name the header name
169     */     */
170    public int getIntHeader (String name)    public int getIntHeader(String name)
171    {    {
172      return headers.getIntValue (name);      return headers.getIntValue(name);
173    }    }
174    
175    /**    /**
176     * Returns the header value for the specified name as a date.     * Returns the header value for the specified name as a date.
177     * @param name the header name     * @param name the header name
178     */     */
179    public Date getDateHeader (String name)    public Date getDateHeader(String name)
180    {    {
181      return headers.getDateValue (name);      return headers.getDateValue(name);
182    }    }
183    
184  }  }
185    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26