Top Description Fields Constructors Methods
com.sun.webkit.network

pack-priv final Class Cookie

extends Object
Class Inheritance
Imports
com.sun.javafx.logging.PlatformLogger, java.net.URI, java.text.ParseException, java.util.regex.Matcher, .Pattern

An RFC 6265-compliant cookie.

Field Summary

Modifier and TypeField and Description
private ExtendedTime
private String
private final long
private boolean
private final boolean
private static final Pattern
private long
private static final PlatformLogger
private final String
private String
private final boolean
private final boolean
private final String

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
defaultPath(URI uri)

Computes the default path for a given URI.

pack-priv static boolean
domainMatches(String domain, String cookieDomain)

Determines if a domain matches another domain.

private static boolean
equal(Object obj1, Object obj2)

Determines, in null-safe manner, if two objects are equal.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

pack-priv ExtendedTime
getCreationTime()

Returns the creation time of this cookie.

pack-priv String
getDomain()

Returns the domain of this cookie.

pack-priv long
getExpiryTime()

Returns the expiry time of this cookie.

pack-priv boolean
getHostOnly()

Returns the host-only property of this cookie.

pack-priv boolean
getHttpOnly()

Returns the http-only property of this cookie.

pack-priv long
getLastAccessTime()

Returns the last access time of this cookie.

pack-priv String
getName()

Returns the name of this cookie.

pack-priv String
getPath()

Returns the path of this cookie.

pack-priv boolean
getPersistent()

Returns the persistent property of this cookie.

pack-priv boolean
getSecureOnly()

Returns the secure-only property of this cookie.

pack-priv String
getValue()

Returns the value of this cookie.

pack-priv boolean
hasExpired()

Determines if this cookie has expired.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private static int
hashCode(Object obj)

Computes the hash code of an object in null safe-manner.

private static boolean
isIpAddress(String hostname)

Determines if a hostname is an IP address.

pack-priv static Cookie
parse(String setCookieString, ExtendedTime currentTime)

Parses a Set-Cookie header string into a Cookie object.

private static String
parseDomain(String attributeValue)

Parses the value of the Domain attribute.

private static long
parseExpires(String attributeValue)

Parses the value of the Expires attribute.

private static long
parseMaxAge(String attributeValue, long currentTime)

Parses the value of the Max-Age attribute.

private static String
parsePath(String attributeValue)

Parses the value of the Path attribute.

pack-priv static boolean
pathMatches(String path, String cookiePath)

Determines if a path matches another path.

pack-priv void
setCreationTime(ExtendedTime creationTime)

Sets the creation time of this cookie.

pack-priv void
setDomain(String domain)

Sets the domain of this cookie.

pack-priv void
setHostOnly(boolean hostOnly)

Sets the host-only property of this cookie.

pack-priv void
setLastAccessTime(long lastAccessTime)

Sets the last access time of this cookie.

pack-priv void
setPath(String path)

Sets the path of this cookie.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

creationTimeback to summary
private ExtendedTime creationTime
domainback to summary
private String domain
expiryTimeback to summary
private final long expiryTime
hostOnlyback to summary
private boolean hostOnly
httpOnlyback to summary
private final boolean httpOnly
IP_ADDRESS_PATTERNback to summary
private static final Pattern IP_ADDRESS_PATTERN
lastAccessTimeback to summary
private long lastAccessTime
loggerback to summary
private static final PlatformLogger logger
nameback to summary
private final String name
pathback to summary
private String path
persistentback to summary
private final boolean persistent
secureOnlyback to summary
private final boolean secureOnly
valueback to summary
private final String value

Constructor Detail

Method Detail

defaultPathback to summary
pack-priv static String defaultPath(URI uri)

Computes the default path for a given URI.

domainMatchesback to summary
pack-priv static boolean domainMatches(String domain, String cookieDomain)

Determines if a domain matches another domain.

equalback to summary
private static boolean equal(Object obj1, Object obj2)

Determines, in null-safe manner, if two objects are equal.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getCreationTimeback to summary
pack-priv ExtendedTime getCreationTime()

Returns the creation time of this cookie.

getDomainback to summary
pack-priv String getDomain()

Returns the domain of this cookie.

getExpiryTimeback to summary
pack-priv long getExpiryTime()

Returns the expiry time of this cookie.

getHostOnlyback to summary
pack-priv boolean getHostOnly()

Returns the host-only property of this cookie.

getHttpOnlyback to summary
pack-priv boolean getHttpOnly()

Returns the http-only property of this cookie.

getLastAccessTimeback to summary
pack-priv long getLastAccessTime()

Returns the last access time of this cookie.

getNameback to summary
pack-priv String getName()

Returns the name of this cookie.

getPathback to summary
pack-priv String getPath()

Returns the path of this cookie.

getPersistentback to summary
pack-priv boolean getPersistent()

Returns the persistent property of this cookie.

getSecureOnlyback to summary
pack-priv boolean getSecureOnly()

Returns the secure-only property of this cookie.

getValueback to summary
pack-priv String getValue()

Returns the value of this cookie.

hasExpiredback to summary
pack-priv boolean hasExpired()

Determines if this cookie has expired.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
hashCodeback to summary
private static int hashCode(Object obj)

Computes the hash code of an object in null safe-manner.

isIpAddressback to summary
private static boolean isIpAddress(String hostname)

Determines if a hostname is an IP address.

parseback to summary
pack-priv static Cookie parse(String setCookieString, ExtendedTime currentTime)

Parses a Set-Cookie header string into a Cookie object.

parseDomainback to summary
private static String parseDomain(String attributeValue) throws ParseException

Parses the value of the Domain attribute.

parseExpiresback to summary
private static long parseExpires(String attributeValue) throws ParseException

Parses the value of the Expires attribute.

parseMaxAgeback to summary
private static long parseMaxAge(String attributeValue, long currentTime) throws ParseException

Parses the value of the Max-Age attribute.

parsePathback to summary
private static String parsePath(String attributeValue)

Parses the value of the Path attribute.

pathMatchesback to summary
pack-priv static boolean pathMatches(String path, String cookiePath)

Determines if a path matches another path.

setCreationTimeback to summary
pack-priv void setCreationTime(ExtendedTime creationTime)

Sets the creation time of this cookie.

setDomainback to summary
pack-priv void setDomain(String domain)

Sets the domain of this cookie.

setHostOnlyback to summary
pack-priv void setHostOnly(boolean hostOnly)

Sets the host-only property of this cookie.

setLastAccessTimeback to summary
pack-priv void setLastAccessTime(long lastAccessTime)

Sets the last access time of this cookie.

setPathback to summary
pack-priv void setPath(String path)

Sets the path of this cookie.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override