Overview | Package | Class | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.latka.http
Class ResponseImpl

    java.lang.Object
      |
      +--org.apache.commons.latka.http.ResponseImpl

All Implemented Interfaces:
  Response

public class ResponseImpl
extends java.lang.Object
implements Response

An implementation of a Latka Response interface based on the Jakarta Commons HttpClient package.

Author:
  Doug Sale, Morgan Delagrange

Method Summary
`int` | `getByteLength()` Returns the length of the Response stream (as bytes), or -1 if no stream is available
`java.lang.String` | `getHeader(java.lang.String headerName)` Check a response header.
`Request` | `getRequest()` The request that generated this response
`java.lang.String` | `getResource()`
`int` | `getStatusCode()`
`java.io.InputStream` | `getStream()` Get the actual bytes returned by the web server

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getByteLength

    public int getByteLength()

  Description copied from interface: `Response`
  Returns the length of the Response stream (as bytes), or -1 if no stream is available
  Specified by:
    `getByteLength` in interface `Response`
  Following copied from interface: `org.apache.commons.latka.http.Response`
  Returns:
    Byte length of the response stream

### getHeader

    public java.lang.String getHeader(java.lang.String headerName)

  Description copied from interface: `Response`
  Check a response header.
  Specified by:
    `getHeader` in interface `Response`
  Following copied from interface: `org.apache.commons.latka.http.Response`
  Parameters:
    `headerName` - The name of the header to find in the Reponse
  Returns:
    the value of the header, or null if the header does not exist

### getRequest

    public Request getRequest()

  Description copied from interface: `Response`
  The request that generated this response
  Specified by:
    `getRequest` in interface `Response`

### getResource

    public java.lang.String getResource()

  Specified by:
    `getResource` in interface `Response`
  Following copied from interface: `org.apache.commons.latka.http.Response`
  Returns:
    the resource, in string form, provided by the HTTP server.

### getStatusCode

    public int getStatusCode()

  Specified by:
    `getStatusCode` in interface `Response`
  Following copied from interface: `org.apache.commons.latka.http.Response`
  Returns:
    the integer status code provided by the HTTP server.

### getStream

    public java.io.InputStream getStream()

  Description copied from interface: `Response`
  Get the actual bytes returned by the web server
  Specified by:
    `getStream` in interface `Response`
  Following copied from interface: `org.apache.commons.latka.http.Response`
  Returns:
    InputStream containing the HTTP response

Overview | Package | Class | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. Documenation generated September 13 2001.