jp.cssj.resolver
インタフェース Source

すべてのスーパーインタフェース:
MetaSource
既知の実装クラスの一覧:
AbstractSource, CachedSource, SourceWrapper

public interface Source
extends MetaSource

ファイル、ウェブ上の文書等のデータの源です。

バージョン:
$Id: Source.java 324 2009-08-02 05:51:25Z miyabe $
作成者:
MIYABE Tatsuhiko

メソッドの概要
 boolean exists()
          データが存在すればtrueを返します。
 String getEncoding()
          キャラクタ・エンコーディングを返します。
 File getFile()
          ファイルとして返します。
 InputStream getInputStream()
          バイナリストリームを返します。
 long getLength()
          データのサイズを返します。
 String getMimeType()
          データのMIME型を返します。
 Reader getReader()
          テキストストリームを返します。
 URI getURI()
          データのURIを返します。
 SourceValidity getValidity()
          データの変更情報を返します。
 boolean isFile()
          ファイルならtrueを返します。
 boolean isInputStream()
          バイナリデータとして取得可能ならtrueを返します。
 boolean isReader()
          テキストデータとして取得可能ならtrueを返します。
 

メソッドの詳細

getURI

public URI getURI()
データのURIを返します。

定義:
インタフェース MetaSource 内の getURI
戻り値:
データの位置を示すURI。

exists

public boolean exists()
               throws IOException
データが存在すればtrueを返します。

戻り値:
データが存在すればtrue、そうでなければfalse。
例外:
IOException

getMimeType

public String getMimeType()
                   throws IOException
データのMIME型を返します。不確定な場合はnull。

定義:
インタフェース MetaSource 内の getMimeType
戻り値:
このデータのMIME型。
例外:
IOException

getEncoding

public String getEncoding()
                   throws IOException
キャラクタ・エンコーディングを返します。未定の場合はnullです。

定義:
インタフェース MetaSource 内の getEncoding
戻り値:
このデータのキャラクタ・エンコーディング。
例外:
IOException

isInputStream

public boolean isInputStream()
                      throws IOException
バイナリデータとして取得可能ならtrueを返します。

戻り値:
バイナリデータを取得できる場合はtrue。
例外:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  UnsupportedOperationException
バイナリストリームを返します。

戻り値:
データのバイナリストリーム。
例外:
IOException
UnsupportedOperationException

isReader

public boolean isReader()
                 throws IOException
テキストデータとして取得可能ならtrueを返します。

戻り値:
テキストデータとして取得できる場合はtrue。
例外:
IOException

getReader

public Reader getReader()
                 throws IOException,
                        UnsupportedOperationException
テキストストリームを返します。

戻り値:
データのテキストストリーム。
例外:
IOException
UnsupportedOperationException

isFile

public boolean isFile()
               throws IOException
ファイルならtrueを返します。

戻り値:
データがファイルであればtrue。
例外:
IOException

getFile

public File getFile()
             throws UnsupportedOperationException
ファイルとして返します。

戻り値:
データが格納されたファイル。
例外:
UnsupportedOperationException

getValidity

public SourceValidity getValidity()
                           throws IOException
データの変更情報を返します。

戻り値:
データの変更状況を表すSourceValidity。
例外:
IOException

getLength

public long getLength()
               throws IOException
データのサイズを返します。不明な場合は-1を返します。

定義:
インタフェース MetaSource 内の getLength
戻り値:
データのバイト数。
例外:
IOException


(c)2008-2009 GNN & Co.,Ltd.