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:[EMAIL PROTECTED]";>Doug Sale</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to