Kagetaka

net.hizlab.kagetaka.rendering
クラス Content

java.lang.Object
  拡張net.hizlab.kagetaka.rendering.Content
直系の既知のサブクラス:
ViewerContent

public class Content
extends Object

コンテンツを表すクラスです。

バージョン:
$Revision: 1.9 $

フィールドの概要
protected  URLConnection connection
          コネクション
 int contentLength
          ドキュメントのコンテンツサイズ
protected  ContentType contentType
          ドキュメントのコンテンツタイプ
 long date
          ドキュメントの取得日付
 long destroy
          ドキュメントの破棄日付
 String eTag
          ドキュメントの最終更新日
 long expiration
          ドキュメントの有効期限
protected  InputStream inputStream
          インプットストリーム
 long lastModified
          ドキュメントの最終更新日
protected  Object object
          コンテンツオブジェクト
protected  boolean timeAdjustment
          時刻の補正をするかどうか
static int TYPE_ALL
          全タイプ
static int TYPE_AUDIO
          audio タイプ
static int TYPE_IMAGE
          image タイプ
static int TYPE_TEXT
          text タイプ
 URL url
          ドキュメントの URL
 
コンストラクタの概要
Content(URLConnection connection)
          コンテンツを作成します。
 
メソッドの概要
 ContentType getContentType()
          コンテンツタイプを返します。
 String getEncoding()
          ドキュメントのエンコーディングを返します。
 InputStream getInputStream(Reporter reporter)
          コンテンツを読み取る入力ストリームを返します。
 Object getObject(int type)
          コンテンツの中身をオブジェクトととして返します。
 boolean isCached()
          キャッシュされたコンテンツかどうかを返します。
 void setEncoding(String encoding)
          ドキュメントのエンコーディングを設定します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

connection

protected URLConnection connection
コネクション


contentLength

public final int contentLength
ドキュメントのコンテンツサイズ


contentType

protected ContentType contentType
ドキュメントのコンテンツタイプ


date

public final long date
ドキュメントの取得日付


destroy

public final long destroy
ドキュメントの破棄日付


eTag

public final String eTag
ドキュメントの最終更新日


expiration

public final long expiration
ドキュメントの有効期限


inputStream

protected InputStream inputStream
インプットストリーム


lastModified

public final long lastModified
ドキュメントの最終更新日


object

protected Object object
コンテンツオブジェクト


timeAdjustment

protected boolean timeAdjustment
時刻の補正をするかどうか


TYPE_ALL

public static final int TYPE_ALL
全タイプ

関連項目:
定数フィールド値

TYPE_AUDIO

public static final int TYPE_AUDIO
audio タイプ

関連項目:
定数フィールド値

TYPE_IMAGE

public static final int TYPE_IMAGE
image タイプ

関連項目:
定数フィールド値

TYPE_TEXT

public static final int TYPE_TEXT
text タイプ

関連項目:
定数フィールド値

url

public final URL url
ドキュメントの URL

コンストラクタの詳細

Content

public Content(URLConnection connection)
コンテンツを作成します。

パラメータ:
connection - コネクション
メソッドの詳細

getContentType

public ContentType getContentType()
コンテンツタイプを返します。

戻り値:
コンテンツタイプ

getEncoding

public String getEncoding()
ドキュメントのエンコーディングを返します。

戻り値:
ドキュメントのエンコーディング

getInputStream

public InputStream getInputStream(Reporter reporter)
                           throws IOException
コンテンツを読み取る入力ストリームを返します。

パラメータ:
reporter - レポータ
戻り値:
入力ストリーム
例外:
IOException - IO エラーが発生した場合

getObject

public Object getObject(int type)
                 throws IOException
コンテンツの中身をオブジェクトととして返します。

パラメータ:
type - 取得するコンテンツのタイプ
戻り値:
コンテンツの中身
例外:
IOException - IO エラーが発生した場合

isCached

public boolean isCached()
キャッシュされたコンテンツかどうかを返します。

戻り値:
キャッシュされたコンテンツの場合は true、 それ以外の場合は false

setEncoding

public void setEncoding(String encoding)
ドキュメントのエンコーディングを設定します。

パラメータ:
encoding - ドキュメントのエンコーディング

Kagetaka

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