Kagetaka

net.hizlab.kagetaka.net
クラス URLConnectionWrapper12

java.lang.Object
  拡張java.net.URLConnection
      拡張net.hizlab.kagetaka.net.URLConnectionWrapper
          拡張net.hizlab.kagetaka.net.URLConnectionWrapper12
直系の既知のサブクラス:
URLConnectionWrapper14

public class URLConnectionWrapper12
extends URLConnectionWrapper

Java2(1.2 以降)の機能を備えた URLConnection ラッパーです。

バージョン:
$Revision: 1.2 $

フィールドの概要
 
クラス net.hizlab.kagetaka.net.URLConnectionWrapper から継承したフィールド
connection, inputStream
 
クラス java.net.URLConnection から継承したフィールド
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
コンストラクタの概要
URLConnectionWrapper12(URL url, URLConnection connection, InputStream is)
          新しいインスタンスを作成します。
 
メソッドの概要
 void addRequestProperty(String key, String value)
          リクエストプロパティを追加します。
 Object getContent(Class[] classes)
          この URL 接続のコンテンツを取得します。
 Permission getPermission()
          このオブジェクトが表す接続の実行に必要なアクセス権を表す、 Permission オブジェクトを返します。
 Map getRequestProperties()
          リクエストプロパティを返します。
 
クラス net.hizlab.kagetaka.net.URLConnectionWrapper から継承したメソッド
connect, equals, getAllowUserInteraction, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getRequestProperty, getURL, getUseCaches, hashCode, setAllowUserInteraction, setDefaultUseCaches, setDoInput, setDoOutput, setIfModifiedSince, setRequestProperty, setUseCaches, toString
 
クラス java.net.URLConnection から継承したメソッド
getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getHeaderFields, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

URLConnectionWrapper12

public URLConnectionWrapper12(URL url,
                              URLConnection connection,
                              InputStream is)
新しいインスタンスを作成します。

パラメータ:
url - URL
connection - コネクション
is - 入力ストリーム。 connection から取得する場合は null
メソッドの詳細

addRequestProperty

public void addRequestProperty(String key,
                               String value)
リクエストプロパティを追加します。

パラメータ:
key - キー
value - 値
例外:
IllegalStateException - すでに接続されている場合
NullPointerException - キーが null の場合
関連項目:
URLConnection.addRequestProperty(String, String)

getContent

public Object getContent(Class[] classes)
                  throws IOException
この URL 接続のコンテンツを取得します。

パラメータ:
classes - 要求されたタイプを示す Class 配列
戻り値:
クラスの配列で指定されたタイプが最初に一致した、 取得したオブジェクト。 要求されたタイプがサポートされていない場合は null
例外:
IOException - サーバへの接続でエラーが発生した場合
UnknownServiceException - プロトコルがそのコンテンツ形式をサポートしていない場合
関連項目:
URLConnection.getContent(Class[])

getPermission

public Permission getPermission()
                         throws IOException
このオブジェクトが表す接続の実行に必要なアクセス権を表す、 Permission オブジェクトを返します。

戻り値:
接続のために必要なアクセス権を表す Permission オブジェクト
例外:
IOException - アクセス権の処理にネットワーク またはファイル入出力が必要なときに、処理中に例外が発生した場合
関連項目:
URLConnection.getPermission()

getRequestProperties

public Map getRequestProperties()
リクエストプロパティを返します。

戻り値:
リクエストプロパティ
例外:
IllegalStateException - すでに接続されている場合
関連項目:
URLConnection.getRequestProperties()

Kagetaka

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