public class NewCookie extends Cookie
| 修飾子と型 | フィールドと説明 |
|---|---|
static int | DEFAULT_MAX_AGECookie が現在のアプリケーション / ブラウザーセッションで期限切れになることを指定します。 |
DEFAULT_VERSION| コンストラクターと説明 |
|---|
NewCookie(Cookie cookie) 提供された Cookie の情報をコピーする新しいインスタンスを作成します。 |
NewCookie(Cookie cookie, StringSE comment, int maxAge, boolean secure) 提供された Cookie の情報を補足する新しいインスタンスを作成します。 |
NewCookie(Cookie cookie, StringSE comment, int maxAge, DateSE expiry, boolean secure, boolean httpOnly) 提供された Cookie の情報を補足する新しいインスタンスを作成します。 |
NewCookie(StringSE name, StringSE value) 新しいインスタンスを作成します。 |
NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, int version, StringSE comment, int maxAge, boolean secure) 新しいインスタンスを作成します。 |
NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, int version, StringSE comment, int maxAge, DateSE expiry, boolean secure, boolean httpOnly) 新しいインスタンスを作成します。 |
NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, StringSE comment, int maxAge, boolean secure) 新しいインスタンスを作成します。 |
NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, StringSE comment, int maxAge, boolean secure, boolean httpOnly) 新しいインスタンスを作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
boolean | equals(ObjectSE obj) 等しいかどうかを比較します。 |
StringSE | getComment()Cookie に関連付けられたコメントを取得します。 |
DateSE | getExpiry()Cookie の有効期限を取得します。 |
int | getMaxAge()Cookie の最大有効期間を秒単位で取得します。 |
int | hashCode() すべてのプロパティをハッシュすることにより、ハッシュコードを生成します。 |
boolean | isHttpOnly() この Cookie に HttpOnly 属性が含まれている場合、true を返します。 |
boolean | isSecure()Cookie が安全な接続を介してのみ送信されるかどうか。 |
Cookie | toCookie() この NewCookie と同じ名前、値、パス、ドメイン、バージョンを持つ Cookie の新しいインスタンスを取得します。 |
StringSE | toString()Cookie を、対応する HTTP ヘッダーの値として使用するのに適した文字列に変換します。 |
static NewCookie | valueOf(StringSE value) 指定された文字列を解析して、NewCookie の新しいインスタンスを作成します。 |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEpublic static final int DEFAULT_MAX_AGE
public NewCookie(StringSE name, StringSE value)
name - クッキーの名前。value - クッキーの値。IllegalArgumentExceptionSE - 名前が null の場合 public NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, StringSE comment, int maxAge, boolean secure)
name - クッキーの名前。value - クッキーの値。path - Cookie が有効な URI パス。domain - Cookie が有効なホストドメイン。comment - コメント。maxAge - Cookie の最大経過時間(秒単位)。secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します。IllegalArgumentExceptionSE - 名前が null の場合 public NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, StringSE comment, int maxAge, boolean secure, boolean httpOnly)
name - クッキーの名前。value - クッキーの値。path - Cookie が有効な URI パス。domain - Cookie が有効なホストドメイン。comment - コメント。maxAge - Cookie の最大経過時間(秒単位)。secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します。httpOnly - true が Cookie を HTTP のみにする場合、つまり HTTP リクエストの一部としてのみ表示される場合。IllegalArgumentExceptionSE - 名前が null の場合 public NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, int version, StringSE comment, int maxAge, boolean secure)
name - クッキーの名前 value - クッキーの値 path - Cookie が有効な URI パス domain - Cookie が有効なホストドメイン version - Cookie が準拠する仕様のバージョン comment - コメント maxAge - Cookie の最大有効期間(秒)secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します IllegalArgumentExceptionSE - 名前が null の場合 public NewCookie(StringSE name, StringSE value, StringSE path, StringSE domain, int version, StringSE comment, int maxAge, DateSE expiry, boolean secure, boolean httpOnly)
name - クッキーの名前 value - クッキーの値 path - Cookie が有効な URI パス domain - Cookie が有効なホストドメイン version - Cookie が準拠する仕様のバージョン comment - コメント maxAge - Cookie の最大有効期間(秒)expiry - Cookie の有効期限。secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します httpOnly - true が Cookie を HTTP のみにする場合、つまり HTTP リクエストの一部としてのみ表示される場合。IllegalArgumentExceptionSE - 名前が null の場合 public NewCookie(Cookie cookie)
cookie - クローンする Cookie。IllegalArgumentExceptionSE - Cookie が null の場合 public NewCookie(Cookie cookie, StringSE comment, int maxAge, boolean secure)
cookie - クローンする Cookie。comment - コメント。maxAge - Cookie の最大経過時間(秒単位)。secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します。IllegalArgumentExceptionSE - Cookie が null の場合 public NewCookie(Cookie cookie, StringSE comment, int maxAge, DateSE expiry, boolean secure, boolean httpOnly)
cookie - クローンする Cookie。comment - コメント。maxAge - Cookie の最大経過時間(秒単位)。expiry - Cookie の有効期限。secure - Cookie が安全な接続を介してのみ送信されるかどうかを指定します。httpOnly - true が Cookie を HTTP のみにする場合、つまり HTTP リクエストの一部としてのみ表示される場合。IllegalArgumentExceptionSE - Cookie が null の場合 public static NewCookie valueOf(StringSE value)
value - クッキー文字列。NewCookieIllegalArgumentExceptionSE - 指定された文字列を解析できないか、null である場合 public StringSE getComment()
public int getMaxAge()
-1 のデフォルト値は、ブラウザー / アプリケーションセッションの終了時に Cookie が破棄されることを示します。Max-Age を使用して Cookie の有効期限を制御することをお勧めしますが、一部のブラウザーは Max-Age を理解しないため、getExpiry() Expires} パラメーターの設定が必要になる場合があります。
getExpiry()public DateSE getExpiry()
Max-Age を使用して Cookie の有効期限を制御することをお勧めしますが、ブラウザーによっては Max-Age を認識しないため、Expires パラメーターの設定が必要になる場合があります。
null。getMaxAge()public boolean isSecure()
false です。true、それ以外の場合は false。public boolean isHttpOnly()
HttpOnly 属性が含まれている場合は、true を返します。つまり、JavaScript のようなスクリプトエンジンから Cookie にアクセスできないようにする必要があります。true、それ以外の場合は false。public Cookie toCookie()
NewCookie と同じ名前、値、パス、ドメイン、バージョンの Cookie の新しいインスタンスを取得します。このメソッドを使用して、別の Cookie と等しいかどうかを比較できるオブジェクトを取得できます。Cookie が NewCookie と比較されることは決してないからです。Cookiepublic StringSE toString()
public int hashCode()
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.