commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/http ResponseImpl.java
Date Thu, 11 Apr 2002 15:06:07 GMT
dion        02/04/11 08:06:07

  Modified:    latka/src/java/org/apache/commons/latka/http
                        ResponseImpl.java
  Log:
  Fixed tabbing/format
  
  Revision  Changes    Path
  1.15      +61 -61    jakarta-commons/latka/src/java/org/apache/commons/latka/http/ResponseImpl.java
  
  Index: ResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/ResponseImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ResponseImpl.java	11 Apr 2002 15:04:35 -0000	1.14
  +++ ResponseImpl.java	11 Apr 2002 15:06:07 -0000	1.15
  @@ -74,68 +74,68 @@
    * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a>
    * @author <a href="mailto:mdelagra@us.britannica.com">Morgan Delagrange</a>
    * @author dIon Gillard
  - * @version $Id: ResponseImpl.java,v 1.14 2002/04/11 15:04:35 dion Exp $
  + * @version $Id: ResponseImpl.java,v 1.15 2002/04/11 15:06:07 dion Exp $
    */
   public class ResponseImpl implements Response {
   
  -  protected RequestImpl _request;
  -  protected HttpMethod  _httpMethod;
  +    /** */
  +    protected RequestImpl _request;
  +    protected HttpMethod  _httpMethod;
  +
  +    /**
  +     * Create a Response
  +     *
  +     * @param request  the request that motivated this response
  +     */
  +    ResponseImpl(RequestImpl request) {
  +        _request = request;
  +        _httpMethod = request.getHttpMethod();
  +    }
  +
  +    // defined in interface
  +    public Request getRequest() {
  +        return _request;
  +    }
  +
  +    ////////////////////////////////
  +    // Response Interface Methods //
  +    ////////////////////////////////
   
  -  /**
  -   * Create a Response
  -   *
  -   * @param request  the request that motivated this response
  -   */
  -  ResponseImpl(RequestImpl request) {
  -    _request = request;
  -    _httpMethod = request.getHttpMethod();
  -  }
  -
  -  // defined in interface
  -  public Request getRequest() {
  -    return _request;
  -  }
  -
  -  ////////////////////////////////
  -  // Response Interface Methods //
  -  ////////////////////////////////
  -
  -
  -  // defined in interface
  -  public int getStatusCode() {
  -    return _httpMethod.getStatusCode();
  -  }
  -
  -  // defined in interface
  -  public String getResource() {
  -    return _httpMethod.getResponseBodyAsString();
  -  }
  -
  -  // defined in interface
  -  public String getHeader(String headerName) {
  -    Header header = _httpMethod.getResponseHeader(headerName);
  -    if (header != null) {
  -      return header.getValue();
  -    }
  -    return null;
  -  }
  -
  -  // defined in interface
  -  public int getByteLength() {
  -    return _httpMethod.getResponseBody().length;
  -  }
  -
  -  // defined in interface
  -  public InputStream getStream() {
  -    InputStream stream;
  -
  -    try {
  -      stream = _httpMethod.getResponseBodyAsStream();
  -    }
  -    catch (IOException ioX) {
  -      stream = null;
  -    }
  -
  -    return stream;
  -  }
  -}
  +
  +    // defined in interface
  +    public int getStatusCode() {
  +        return _httpMethod.getStatusCode();
  +    }
  +
  +    // defined in interface
  +    public String getResource() {
  +        return _httpMethod.getResponseBodyAsString();
  +    }
  +
  +    // defined in interface
  +    public String getHeader(String headerName) {
  +        Header header = _httpMethod.getResponseHeader(headerName);
  +        if (header != null) {
  +            return header.getValue();
  +        }
  +        return null;
  +    }
  +
  +    // defined in interface
  +    public int getByteLength() {
  +        return _httpMethod.getResponseBody().length;
  +    }
  +
  +    // defined in interface
  +    public InputStream getStream() {
  +        InputStream stream;
  +
  +        try {
  +            stream = _httpMethod.getResponseBodyAsStream();
  +        } catch (IOException ioX) {
  +            stream = null;
  +        }
  +
  +        return stream;
  +    }
  +}
  \ No newline at end of file
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message