|
Kagetaka | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.net.URLConnection
java.net.HttpURLConnection
javax.net.ssl.HttpsURLConnection
net.hizlab.kagetaka.protocol.https.Hawk2HttpsURLConnection
Java2 の機能を備えた HTTPS クライアントの基本的な機能を提供します。
フィールドの概要 |
クラス javax.net.ssl.HttpsURLConnection から継承したフィールド |
hostnameVerifier |
クラス java.net.URLConnection から継承したフィールド |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
メソッドの概要 | |
void |
addRequestProperty(String key,
String value)
リクエストプロパティを追加します。 |
void |
connect()
接続を行います。 |
void |
disconnect()
切断します。 |
boolean |
equals(Object obj)
このオブジェクトと他のオブジェクトが等しいかどうかを示します。 |
protected void |
finalize()
ガベージコレクタによって呼び出されます。 |
boolean |
getAllowUserInteraction()
allowUserInteraction フィールド値を返します。 |
String |
getCachePath()
キャッシュファイルのパスを返します。 |
String |
getCipherSuite()
この接続で使用されている符号化方式を返します。 |
Object |
getContent()
この URL 接続のコンテンツを取得します。 |
Object |
getContent(Class[] classes)
この URL 接続のコンテンツを取得します。 |
String |
getContentEncoding()
content-encoding ヘッダフィールドの値を返します。 |
int |
getContentLength()
content-length ヘッダフィールドの値を返します。 |
String |
getContentType()
content-type ヘッダフィールドの値を返します。 |
long |
getDate()
date ヘッダフィールドの値を返します。 |
boolean |
getDefaultUseCaches()
useCaches フラグのデフォルト値を返します。 |
boolean |
getDoInput()
doInput フラグの値を返します。 |
boolean |
getDoOutput()
doOutput フラグの値を返します。 |
InputStream |
getErrorStream()
HTTP エラーが発生した場合(レスポンスコードが 400 以上)に、 入力ストリームを返します。 |
long |
getExpiration()
expires ヘッダフィールドの値を返します。 |
String |
getHeaderField(int n)
n 番目のヘッダフィールドの値を返します。 |
String |
getHeaderField(String name)
指定されたヘッダフィールドの値を返します。 |
long |
getHeaderFieldDate(String name,
long def)
指定されたフィールドを日付として解析した値を返します。 |
int |
getHeaderFieldInt(String name,
int def)
指定されたフィールドを数値として解析した値を返します。 |
String |
getHeaderFieldKey(int n)
n 番目のヘッダフィールドのキーを返します。 |
Map |
getHeaderFields()
ヘッダフィールドの変更不可能なマップを返します。 |
long |
getIfModifiedSince()
ifModifiedSince フィールド値を返します。 |
InputStream |
getInputStream()
入力ストリームを返します。 |
boolean |
getInstanceFollowRedirects()
リダイレクトを行うかどうかを返します。 |
void |
getInstanceFollowRedirects(boolean followRedirects)
リダイレクトを行うかどうかを設定します。 |
long |
getLastModified()
last-modified ヘッダフィールドの値を返します。 |
Certificate[] |
getLocalCertificates()
ハンドシェーク中にサーバに送信された証明書を返します。 |
OutputStream |
getOutputStream()
リクエストで出力する出力ストリームを戻します。 |
Permission |
getPermission()
このオブジェクトが表す接続の実行に必要なアクセス権を表す、 Permission オブジェクトを返します。 |
String |
getRequestMethod()
要求メソッドを取得します。 |
Map |
getRequestProperties()
リクエストプロパティを返します。 |
String |
getRequestProperty(String key)
リクエストプロパティを返します。 |
int |
getResponseCode()
HTTP レスポンスコードを返します。 |
String |
getResponseMessage()
サーバからの応答コードに HTTP 応答メッセージが含まれている場合、 これを返します。 |
Certificate[] |
getServerCertificates()
セッションを定義するときに設定された、サーバの証明書チェーンを返します。 |
URL |
getURL()
URL フィールド値を返します。 |
boolean |
getUseCaches()
useCaches フィールド値を返します。 |
int |
hashCode()
オブジェクトのハッシュコード値を返します。 |
void |
removeCache()
キャッシュデータを破棄します。 |
void |
setAllowUserInteraction(boolean allowuserinteraction)
allowUserInteraction フィールド値を設定します。 |
void |
setDefaultUseCaches(boolean defaultusecaches)
useCaches フィールドのデフォルト値を、
指定された値に設定します。 |
void |
setDoInput(boolean doinput)
doInput フィールド値を指定した値に設定します。 |
void |
setDoOutput(boolean dooutput)
doOutput フィールドの値を、指定された値に設定します。 |
void |
setIfModifiedSince(long ifmodifiedsince)
ifModifiedSince フィールド値を、指定された値に設定します。 |
void |
setRequestMethod(String method)
URL 要求のメソッドを設定します。 |
void |
setRequestProperty(String key,
String value)
リクエストプロパティを設定します。 |
void |
setupCache(CacheManager cm,
PostData pd)
キャッシュマネージャを使用できるようにセットアップします。 |
void |
setUseCaches(boolean usecaches)
useCaches フィールドを、指定された値に設定します。 |
String |
toString()
オブジェクトの文字列表現を返します。 |
boolean |
usingProxy()
プロキシを利用するかどうかを返します。 |
クラス java.net.HttpURLConnection から継承したメソッド |
getFollowRedirects, setFollowRedirects, setInstanceFollowRedirects |
クラス java.lang.Object から継承したメソッド |
clone, getClass, notify, notifyAll, wait, wait, wait |
メソッドの詳細 |
public void addRequestProperty(String key, String value)
key
- キーvalue
- 値
IllegalStateException
- すでに接続されている場合
NullPointerException
- キーが null
の場合URLConnection.addRequestProperty(String, String)
public void connect() throws IOException
IOException
- サーバへの接続でエラーが発生した場合URLConnection.connect()
public void disconnect()
HttpURLConnection.disconnect()
public boolean equals(Object obj)
obj
- 比較対象の参照オブジェクト
true
、そうでない場合は false
Object.equals(Object)
protected void finalize() throws Throwable
Throwable
Object.finalize()
public boolean getAllowUserInteraction()
allowUserInteraction
フィールド値を返します。
allowUserInteraction
フィールド値URLConnection.getAllowUserInteraction()
public String getCachePath()
CacheSupported
内の getCachePath
public String getCipherSuite()
HttpsURLConnection.getCipherSuite()
public Object getContent() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルがそのコンテンツ形式をサポートしていない場合URLConnection.getContent()
public Object getContent(Class[] classes) throws IOException
classes
- 要求されたタイプを示す Class
配列
null
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルがそのコンテンツ形式をサポートしていない場合URLConnection.getContent(Class[])
public String getContentEncoding()
content-encoding
ヘッダフィールドの値を返します。
null
URLConnection.getContentEncoding()
public int getContentLength()
content-length
ヘッダフィールドの値を返します。
-1
URLConnection.getContentLength()
public String getContentType()
content-type
ヘッダフィールドの値を返します。
null
URLConnection.getContentType()
public long getDate()
date
ヘッダフィールドの値を返します。
0
。
戻り値はグリニッジ標準時 1970 年 1 月 1 日 から起算したミリ秒数URLConnection.getDate()
public boolean getDefaultUseCaches()
useCaches
フラグのデフォルト値を返します。
useCaches
フラグのデフォルト値URLConnection.getDefaultUseCaches()
public boolean getDoInput()
doInput
フラグの値を返します。
doInput
フラグの値URLConnection.getDoInput()
public boolean getDoOutput()
doOutput
フラグの値を返します。
doOutput
フラグの値URLConnection.getDoOutput()
public InputStream getErrorStream()
HttpURLConnection.getErrorStream()
public long getExpiration()
expires
ヘッダフィールドの値を返します。
0
。
値はグリニッジ標準時 1970 年 1 月 1 日 から起算したミリ秒数URLConnection.getExpiration()
public String getHeaderField(int n)
n
番目のヘッダフィールドの値を返します。
n
- インデックス
n
番目のヘッダフィールドの値。
フィールドの数が n
個よりも少ない場合は
null
URLConnection.getHeaderField(int)
public String getHeaderField(String name)
name
- ヘッダフィールドの名前
null
URLConnection.getHeaderField(String)
public long getHeaderFieldDate(String name, long def)
name
- ヘッダフィールドの名前def
- デフォルト値
def
引数の値URLConnection.getHeaderFieldDate(String, long)
public int getHeaderFieldInt(String name, int def)
name
- ヘッダフィールドの名前def
- デフォルト値
def
引数の値URLConnection.getHeaderFieldInt(String, int)
public String getHeaderFieldKey(int n)
n
番目のヘッダフィールドのキーを返します。
n
- インデックス
n
番目のヘッダフィールドのキー。
フィールドの数が n
個よりも少ない場合は
null
URLConnection.getHeaderFieldKey(int)
public Map getHeaderFields()
URLConnection.getHeaderFields()
public long getIfModifiedSince()
ifModifiedSince
フィールド値を返します。
ifModifiedSince
フィールド値URLConnection.getIfModifiedSince()
public InputStream getInputStream() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルが入力をサポートしていない場合URLConnection.getInputStream()
public boolean getInstanceFollowRedirects()
true
、
しない場合は false
HttpURLConnection.getInstanceFollowRedirects()
public void getInstanceFollowRedirects(boolean followRedirects)
followRedirects
- リダイレクトする場合は true
、
しない場合は false
HttpURLConnection.setInstanceFollowRedirects(boolean)
public long getLastModified()
last-modified
ヘッダフィールドの値を返します。
0
。
戻り値はグリニッジ標準時 1970 年 1 月 1 日 から起算したミリ秒数URLConnection.getLastModified()
public Certificate[] getLocalCertificates()
null
HttpsURLConnection.getLocalCertificates()
public OutputStream getOutputStream() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルが出力をサポートしていない場合URLConnection.getOutputStream()
public Permission getPermission() throws IOException
Permission
オブジェクトを返します。
Permission
オブジェクト
IOException
- アクセス権の処理にネットワーク
またはファイル入出力が必要なときに、処理中に例外が発生した場合URLConnection.getPermission()
public String getRequestMethod()
HttpURLConnection.getRequestMethod()
public Map getRequestProperties()
IllegalStateException
- すでに接続されている場合URLConnection.getRequestProperties()
public String getRequestProperty(String key)
key
- キー
IllegalStateException
- すでに接続されている場合URLConnection.getRequestProperty(String)
public int getResponseCode() throws IOException
IOException
- サーバへの接続でエラーが発生した場合HttpURLConnection.getResponseCode()
public String getResponseMessage() throws IOException
null
IOException
- サーバへの接続でエラーが発生した場合HttpURLConnection.getResponseMessage()
public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
- ピアが確認されなかった場合HttpsURLConnection.getServerCertificates()
public URL getURL()
URLConnection.getURL()
public boolean getUseCaches()
useCaches
フィールド値を返します。
useCaches
フィールド値URLConnection.getUseCaches()
public int hashCode()
Object.hashCode()
public void removeCache()
CacheSupported
内の removeCache
public void setAllowUserInteraction(boolean allowuserinteraction)
allowUserInteraction
フィールド値を設定します。
allowuserinteraction
- 新しい値
IllegalStateException
- すでに接続されている場合URLConnection.setAllowUserInteraction(boolean)
public void setDefaultUseCaches(boolean defaultusecaches)
useCaches
フィールドのデフォルト値を、
指定された値に設定します。
defaultusecaches
- 新しい値URLConnection.setDefaultUseCaches(boolean)
public void setDoInput(boolean doinput)
doInput
フィールド値を指定した値に設定します。
doinput
- 新しい値
IllegalStateException
- すでに接続されている場合URLConnection.setDoInput(boolean)
public void setDoOutput(boolean dooutput)
doOutput
フィールドの値を、指定された値に設定します。
dooutput
- 新しい値
IllegalStateException
- すでに接続されている場合URLConnection.setDoOutput(boolean)
public void setIfModifiedSince(long ifmodifiedsince)
ifModifiedSince
フィールド値を、指定された値に設定します。
ifmodifiedsince
- 新しい値
IllegalStateException
- すでに接続されている場合URLConnection.setIfModifiedSince(long)
public void setRequestMethod(String method) throws ProtocolException
method
- HTTP メソッド
ProtocolException
- メソッドをリセットできない場合、
または要求したメソッドが無効の場合HttpURLConnection.setRequestMethod(String)
public void setRequestProperty(String key, String value)
key
- キーvalue
- 値
IllegalStateException
- すでに接続されている場合
NullPointerException
- キーが null
の場合URLConnection.setRequestProperty(String, String)
public void setupCache(CacheManager cm, PostData pd)
CacheSupported
内の setupCache
cm
- キャッシュマネージャpd
- POST データpublic void setUseCaches(boolean usecaches)
useCaches
フィールドを、指定された値に設定します。
usecaches
- 新しい値
IllegalStateException
- すでに接続されている場合URLConnection.setUseCaches(boolean)
public String toString()
Object.toString()
public boolean usingProxy()
true
、
利用しない場合は false
HttpURLConnection.usingProxy()
|
Kagetaka | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'