Package org.restlet.engine.header
Class CookieSettingReader
- java.lang.Object
-
- org.restlet.engine.header.HeaderReader<CookieSetting>
-
- org.restlet.engine.header.CookieSettingReader
-
public class CookieSettingReader extends HeaderReader<CookieSetting>
Cookie setting header reader.
-
-
Field Summary
Fields Modifier and Type Field Description private ParametercachedPairThe cached pair.private intglobalVersionThe global cookie specification version.private static java.lang.StringNAME_SET_ACCESS_RESTRICTEDprivate static java.lang.StringNAME_SET_COMMENTprivate static java.lang.StringNAME_SET_COMMENT_URLprivate static java.lang.StringNAME_SET_DISCARDprivate static java.lang.StringNAME_SET_DOMAINprivate static java.lang.StringNAME_SET_EXPIRESprivate static java.lang.StringNAME_SET_MAX_AGEprivate static java.lang.StringNAME_SET_PATHprivate static java.lang.StringNAME_SET_PORTprivate static java.lang.StringNAME_SET_SECUREprivate static java.lang.StringNAME_SET_VERSION
-
Constructor Summary
Constructors Constructor Description CookieSettingReader(java.lang.String header)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CookieSettingread(java.lang.String cookieSetting)Parses the given String to a CookieSettingprivate ParameterreadPair()Reads the next pair as a parameter.CookieSettingreadValue()Read the next value.-
Methods inherited from class org.restlet.engine.header.HeaderReader
addValues, canAdd, createParameter, createParameter, mark, peek, read, readActualNamedValue, readComment, readDate, readDigits, readHeader, readHeader, readNamedValue, readParameter, readQuotedString, readRawText, readRawValue, readToken, readValues, reset, skipParameterSeparator, skipSpaces, skipValueSeparator, unread
-
-
-
-
Field Detail
-
NAME_SET_ACCESS_RESTRICTED
private static final java.lang.String NAME_SET_ACCESS_RESTRICTED
- See Also:
- Constant Field Values
-
NAME_SET_COMMENT
private static final java.lang.String NAME_SET_COMMENT
- See Also:
- Constant Field Values
-
NAME_SET_COMMENT_URL
private static final java.lang.String NAME_SET_COMMENT_URL
- See Also:
- Constant Field Values
-
NAME_SET_DISCARD
private static final java.lang.String NAME_SET_DISCARD
- See Also:
- Constant Field Values
-
NAME_SET_DOMAIN
private static final java.lang.String NAME_SET_DOMAIN
- See Also:
- Constant Field Values
-
NAME_SET_EXPIRES
private static final java.lang.String NAME_SET_EXPIRES
- See Also:
- Constant Field Values
-
NAME_SET_MAX_AGE
private static final java.lang.String NAME_SET_MAX_AGE
- See Also:
- Constant Field Values
-
NAME_SET_PATH
private static final java.lang.String NAME_SET_PATH
- See Also:
- Constant Field Values
-
NAME_SET_PORT
private static final java.lang.String NAME_SET_PORT
- See Also:
- Constant Field Values
-
NAME_SET_SECURE
private static final java.lang.String NAME_SET_SECURE
- See Also:
- Constant Field Values
-
NAME_SET_VERSION
private static final java.lang.String NAME_SET_VERSION
- See Also:
- Constant Field Values
-
cachedPair
private volatile Parameter cachedPair
The cached pair. Used by the readPair() method.
-
globalVersion
private volatile int globalVersion
The global cookie specification version.
-
-
Method Detail
-
read
public static CookieSetting read(java.lang.String cookieSetting) throws java.lang.IllegalArgumentException
Parses the given String to a CookieSetting- Parameters:
cookieSetting-- Returns:
- the CookieSetting parsed from the String
- Throws:
java.lang.IllegalArgumentException- Thrown if the String can not be parsed as CookieSetting.
-
readPair
private Parameter readPair() throws java.io.IOException
Reads the next pair as a parameter.- Returns:
- The next pair as a parameter.
- Throws:
java.io.IOException
-
readValue
public CookieSetting readValue() throws java.io.IOException
Description copied from class:HeaderReaderRead the next value. There can be multiple values for a single header. Returns null by default.- Overrides:
readValuein classHeaderReader<CookieSetting>- Returns:
- The next value.
- Throws:
java.io.IOException
-
-