Package com.sun.ts.lib.util

# Class WebUtil.Response

java.lang.Object
com.sun.ts.lib.util.WebUtil.Response

Enclosing class:
  WebUtil

public static class WebUtil.Response extends Object
Reponse object containing information returned from the web server

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `authenticationRequested`
  Flag; true if authentication requested
  `String`
  `content`
  Actual page content
  `Hashtable`
  `cookies`
  Storage for cookies
  `String`
  `location`
  Location (for redirections)
  `String`
  `statusToken`
  Status (e.g. 401)
  `String`
  `versionToken`
  Version (usually HTTP/1.0)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Response()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isError()`
  Returns true if the status token for this response represents an error, or false if the status token indicates the page was retrieved okay.
  `void`
  `parseCookie(String cookieLine)`
  Parses a header line for an old-style cookie (not Set-Cookie2), and stores the cookie in the cookies table.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### versionToken

    public String versionToken
    Version (usually HTTP/1.0)

  - ### statusToken

    public String statusToken
    Status (e.g. 401)

  - ### location

    public String location
    Location (for redirections)

  - ### content

    public String content
    Actual page content

  - ### cookies

    public Hashtable cookies
    Storage for cookies

  - ### authenticationRequested

    public boolean authenticationRequested
    Flag; true if authentication requested

- ## Constructor Details

  - ### Response

    public Response()

- ## Method Details

  - ### parseCookie

    public void parseCookie(String cookieLine)
    Parses a header line for an old-style cookie (not Set-Cookie2), and stores the cookie in the cookies table. Only the key and value are stored. Expected syntax: "Set-Cookie: NAME=VALUE[;...]" The key is stored in upper-case.
    Parameters:
      `cookieLine` - The string with the cookie in it.

  - ### isError

    public boolean isError()
    Returns true if the status token for this response represents an error, or false if the status token indicates the page was retrieved okay. Note that a redirection is not an error.