Class Cookie


public class Cookie extends NameValuePair
The Class Cookie.
  • Constructor Details

    • Cookie

      public Cookie(String name, String value)

      Constructor for Cookie.

      Parameters:
      name - a String object.
      value - a String object.
  • Method Details

    • getEncodedName

      public String getEncodedName() throws UnsupportedEncodingException
      Gets the encoded name.
      Returns:
      the encoded name
      Throws:
      UnsupportedEncodingException - if any.
    • getEncodedValue

      public String getEncodedValue() throws UnsupportedEncodingException
      Gets the encoded value.
      Returns:
      the encoded value
      Throws:
      UnsupportedEncodingException - if any.
    • setComment

      public void setComment(String comment)
      Sets the comment.
      Parameters:
      comment - the new comment
    • setDomain

      public void setDomain(String domain)
      Sets the domain.
      Parameters:
      domain - the new domain
    • setMaxAge

      public void setMaxAge(int age)
      Sets the max age.
      Parameters:
      age - the new max age
    • setPath

      public void setPath(String path)
      Sets the path.
      Parameters:
      path - the new path
    • setSecure

      public void setSecure(boolean secure)
      Sets the secure.
      Parameters:
      secure - the new secure
    • setVersion

      public void setVersion(int version)
      Sets the version.
      Parameters:
      version - the new version
    • setHttpOnly

      public void setHttpOnly(boolean httpOnly)

      Setter for the field httpOnly.

      Parameters:
      httpOnly - a boolean.