Package org.jboss.resteasy.plugins.delegates

## Class ServerCookie

- java.lang.Object
- - org.jboss.resteasy.plugins.delegates.ServerCookie

- All Implemented Interfaces:
    `Serializable`

      public class ServerCookie
      extends Object
      implements Serializable

  Server-side cookie representation. Stolen from Tomcat.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static TimeZone` | `GMT_ZONE` | GMT timezone - all HTTP dates are on GMT

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServerCookie()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `alreadyQuoted​(String value)` |
    `static void` | `appendCookieValue​(StringBuffer headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure)` |
    `static boolean` | `checkName​(String name)` | Deprecated. Not used: Deprecated in the original org.apache.tomcat.util.http.ServerCookie class.
    `static boolean` | `containsCTL​(String value, int version)` |
    `static String` | `formatOldCookie​(Date d)` |
    `static void` | `formatOldCookie​(Date d, StringBuffer sb, FieldPosition fp)` |
    `static String` | `getCookieHeaderName​(int version)` | Return the header name to set the cookie, based on cookie version.
    `static boolean` | `isToken​(String value)` |
    `static boolean` | `isToken2​(String value)` |
    `static void` | `maybeQuote2​(int version, StringBuffer buf, String value)` | Quotes values using rules that vary depending on Cookie version.

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

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

- - ### Field Detail

    - #### GMT_ZONE

          public static final TimeZone GMT_ZONE

      GMT timezone - all HTTP dates are on GMT

  - ### Constructor Detail

    - #### ServerCookie

          public ServerCookie()

  - ### Method Detail

    - #### isToken

          public static boolean isToken​(String value)

    - #### containsCTL

          public static boolean containsCTL​(String value,
                                            int version)

    - #### isToken2

          public static boolean isToken2​(String value)

    - #### checkName

          public static boolean checkName​(String name)

      Deprecated.
      Not used: Deprecated in the original org.apache.tomcat.util.http.ServerCookie class.
      Parameters:
        `name` - name
      Returns:
        boolean flag

    - #### getCookieHeaderName

          public static String getCookieHeaderName​(int version)

      Return the header name to set the cookie, based on cookie version.
      Parameters:
        `version` - cookie version
      Returns:
        cookie header name

    - #### formatOldCookie

          public static String formatOldCookie​(Date d)

    - #### formatOldCookie

          public static void formatOldCookie​(Date d,
                                             StringBuffer sb,
                                             FieldPosition fp)

    - #### appendCookieValue

          public static void appendCookieValue​(StringBuffer headerBuf,
                                               int version,
                                               String name,
                                               String value,
                                               String path,
                                               String domain,
                                               String comment,
                                               int maxAge,
                                               boolean isSecure)

    - #### alreadyQuoted

          public static boolean alreadyQuoted​(String value)

    - #### maybeQuote2

          public static void maybeQuote2​(int version,
                                         StringBuffer buf,
                                         String value)

      Quotes values using rules that vary depending on Cookie version.
      Parameters:
        `version` - cookie version
        `buf` - buffer
        `value` - value