|
Kagetaka | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.net.URLConnection
java.net.HttpURLConnection
net.hizlab.kagetaka.net.HttpURLConnectionWrapper
HttpURLConnection
ラッパーです。
フィールドの概要 | |
protected HttpURLConnection |
connection
コネクション |
protected InputStream |
inputStream
入力ストリーム |
クラス java.net.URLConnection から継承したフィールド |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
コンストラクタの概要 | |
HttpURLConnectionWrapper(URL url,
HttpURLConnection connection,
InputStream is)
HttpURLConnection のラッパークラスを作成します。 |
メソッドの概要 | |
void |
connect()
接続を行います。 |
void |
disconnect()
切断します。 |
boolean |
equals(Object obj)
このオブジェクトと他のオブジェクトが等しいかどうかを示します。 |
boolean |
getAllowUserInteraction()
allowUserInteraction フィールド値を返します。 |
Object |
getContent()
この 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 フラグの値を返します。 |
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 番目のヘッダフィールドのキーを返します。 |
long |
getIfModifiedSince()
ifModifiedSince フィールド値を返します。 |
InputStream |
getInputStream()
入力ストリームを返します。 |
long |
getLastModified()
last-modified ヘッダフィールドの値を返します。 |
OutputStream |
getOutputStream()
リクエストで出力する出力ストリームを戻します。 |
String |
getRequestMethod()
要求メソッドを取得します。 |
String |
getRequestProperty(String key)
リクエストプロパティを返します。 |
int |
getResponseCode()
HTTP レスポンスコードを返します。 |
String |
getResponseMessage()
サーバからの応答コードに HTTP 応答メッセージが含まれている場合、 これを返します。 |
URL |
getURL()
URL フィールド値を返します。 |
boolean |
getUseCaches()
useCaches フィールド値を返します。 |
int |
hashCode()
オブジェクトのハッシュコード値を返します。 |
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 |
setUseCaches(boolean usecaches)
useCaches フィールドを、指定された値に設定します。 |
String |
toString()
オブジェクトの文字列表現を返します。 |
boolean |
usingProxy()
プロキシを利用するかどうかを返します。 |
クラス java.net.HttpURLConnection から継承したメソッド |
getErrorStream, getFollowRedirects, getInstanceFollowRedirects, getPermission, setFollowRedirects, setInstanceFollowRedirects |
クラス java.lang.Object から継承したメソッド |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
フィールドの詳細 |
protected HttpURLConnection connection
protected InputStream inputStream
コンストラクタの詳細 |
public HttpURLConnectionWrapper(URL url, HttpURLConnection connection, InputStream is)
HttpURLConnection
のラッパークラスを作成します。
url
- URLconnection
- コネクションis
- 入力ストリーム。
connection
から取得する場合は
null
HttpURLConnection
メソッドの詳細 |
public void connect() throws IOException
IOException
- サーバへの接続でエラーが発生した場合URLConnection.connect()
public void disconnect()
HttpURLConnection.disconnect()
public boolean equals(Object obj)
obj
- 比較対象の参照オブジェクト
true
、そうでない場合は false
Object.equals(Object)
public boolean getAllowUserInteraction()
allowUserInteraction
フィールド値を返します。
allowUserInteraction
フィールド値URLConnection.getAllowUserInteraction()
public Object getContent() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルがそのコンテンツ形式をサポートしていない場合URLConnection.getContent()
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 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 long getIfModifiedSince()
ifModifiedSince
フィールド値を返します。
ifModifiedSince
フィールド値URLConnection.getIfModifiedSince()
public InputStream getInputStream() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルが入力をサポートしていない場合URLConnection.getInputStream()
public long getLastModified()
last-modified
ヘッダフィールドの値を返します。
0
。
戻り値はグリニッジ標準時 1970 年 1 月 1 日 から起算したミリ秒数URLConnection.getLastModified()
public OutputStream getOutputStream() throws IOException
IOException
- サーバへの接続でエラーが発生した場合
UnknownServiceException
- プロトコルが出力をサポートしていない場合URLConnection.getOutputStream()
public String getRequestMethod()
HttpURLConnection.getRequestMethod()
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 URL getURL()
URLConnection.getURL()
public boolean getUseCaches()
useCaches
フィールド値を返します。
useCaches
フィールド値URLConnection.getUseCaches()
public int hashCode()
Object.hashCode()
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 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'