Kagetaka

net.hizlab.kagetaka.addin.cookie
クラス Cookie

java.lang.Object
  拡張net.hizlab.kagetaka.addin.cookie.Cookie

public class Cookie
extends Object

クッキーを表すクラスです。

バージョン:
$Revision: 1.3 $

コンストラクタの概要
Cookie(String line)
          タブ区切りの文字列から履歴情報を作成します。
Cookie(String data, URL url, boolean strict)
          Set-Cookie ヘッダーの文字列から、新しいクッキーを作成します。
 
メソッドの概要
 String getDomain()
          ドメイン名を返します。
 long getExpires()
          有効期限を返します。
 String getFullValue()
          クッキーの名前と値の組を返します。
 String getName()
          クッキー名を返します。
 Cookie getNext()
          クッキーチェーンの次のクッキーを返します。
 String getPath()
          パスを返します。
 String getValue()
          クッキーの値を返します。
 boolean isSecure()
          セキュアが指定されているかを返します。
 boolean isTargetHost(String host)
          指定されたホストが、このクッキーの対象かどうかを返します。
 boolean isTargetPath(String path)
          指定されたパスが、このクッキーの対象かどうかを返します。
 String toString()
          文字列に変換します。
 void write(Writer w)
          クッキーをタブ区切りで出力します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Cookie

public Cookie(String line)
       throws InvalidObjectException
タブ区切りの文字列から履歴情報を作成します。

パラメータ:
line - 文字列
例外:
InvalidObjectException - 不正なフォーマットの場合

Cookie

public Cookie(String data,
              URL url,
              boolean strict)
       throws ParseException
Set-Cookie ヘッダーの文字列から、新しいクッキーを作成します。

パラメータ:
data - Set-Cookie ヘッダーの文字列
url - クッキーを送ってきた URL
strict - 正しいクッキーのみを受け付ける場合は true、 なるべく解析する場合は false
例外:
ParseException - 不正なフォーマットの場合
メソッドの詳細

getDomain

public String getDomain()
ドメイン名を返します。

戻り値:
ドメイン名

getExpires

public long getExpires()
有効期限を返します。

戻り値:
有効期限

getFullValue

public String getFullValue()
クッキーの名前と値の組を返します。

戻り値:
クッキーの名前と値の組

getName

public String getName()
クッキー名を返します。

戻り値:
クッキー名

getNext

public Cookie getNext()
クッキーチェーンの次のクッキーを返します。

戻り値:
次のクッキー。存在しない場合は null

getPath

public String getPath()
パスを返します。

戻り値:
パス

getValue

public String getValue()
クッキーの値を返します。

戻り値:
クッキーの値

isSecure

public boolean isSecure()
セキュアが指定されているかを返します。

戻り値:
セキュアが指定されている場合は true、 それ以外の場合は false

isTargetHost

public boolean isTargetHost(String host)
指定されたホストが、このクッキーの対象かどうかを返します。

パラメータ:
host - 調べるホスト
戻り値:
このクッキーが対象の場合は true、 それ以外の場合は false

isTargetPath

public boolean isTargetPath(String path)
指定されたパスが、このクッキーの対象かどうかを返します。

パラメータ:
path - 調べるパス
戻り値:
このクッキーが対象の場合は true、 それ以外の場合は false

toString

public String toString()
文字列に変換します。

戻り値:
文字列表現

write

public void write(Writer w)
           throws IOException
クッキーをタブ区切りで出力します。

パラメータ:
w - ライタ
例外:
IOException - I/O エラーが発生した場合

Kagetaka

Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'