jp.cssj.resolver.stream
クラス StreamSource

java.lang.Object
  拡張jp.cssj.resolver.helpers.AbstractSource
      拡張jp.cssj.resolver.stream.StreamSource
すべての実装インタフェース:
MetaSource, Source

public class StreamSource
extends AbstractSource

ストリームからデータを取得するSourceです。

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

フィールドの概要
 
クラス jp.cssj.resolver.helpers.AbstractSource から継承したフィールド
uri
 
コンストラクタの概要
StreamSource(URI uri, InputStream in, String mimeType)
           
StreamSource(URI uri, InputStream in, String mimeType, long length)
           
StreamSource(URI uri, InputStream in, String mimeType, String encoding)
           
StreamSource(URI uri, InputStream in, String mimeType, String encoding, long length)
           
StreamSource(URI uri, Reader reader, String mimeType)
           
StreamSource(URI uri, Reader reader, String mimeType, String encoding)
           
StreamSource(URI uri, Reader reader, String mimeType, String encoding, long length)
           
 
メソッドの概要
 boolean exists()
          データが存在すればtrueを返します。
 String getEncoding()
          キャラクタ・エンコーディングを返します。
 File getFile()
          ファイルとして返します。
 InputStream getInputStream()
          バイナリストリームを返します。
 long getLength()
          データのサイズを返します。
 String getMimeType()
          データのMIME型を返します。
 Reader getReader()
          テキストストリームを返します。
 URI getURI()
          データのURIを返します。
 SourceValidity getValidity()
          データの変更情報を返します。
 boolean isInputStream()
          バイナリデータとして取得可能ならtrueを返します。
 boolean isReader()
          テキストデータとして取得可能ならtrueを返します。
 
クラス jp.cssj.resolver.helpers.AbstractSource から継承したメソッド
close, isFile
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

StreamSource

public StreamSource(URI uri,
                    InputStream in,
                    String mimeType,
                    String encoding,
                    long length)
             throws UnsupportedEncodingException

StreamSource

public StreamSource(URI uri,
                    InputStream in,
                    String mimeType,
                    long length)

StreamSource

public StreamSource(URI uri,
                    Reader reader,
                    String mimeType,
                    String encoding,
                    long length)
             throws IOException

StreamSource

public StreamSource(URI uri,
                    InputStream in,
                    String mimeType,
                    String encoding)
             throws UnsupportedEncodingException

StreamSource

public StreamSource(URI uri,
                    InputStream in,
                    String mimeType)

StreamSource

public StreamSource(URI uri,
                    Reader reader,
                    String mimeType,
                    String encoding)
             throws IOException

StreamSource

public StreamSource(URI uri,
                    Reader reader,
                    String mimeType)
             throws IOException
メソッドの詳細

getURI

public URI getURI()
インタフェース Source の記述:
データのURIを返します。

定義:
インタフェース Source 内の getURI
オーバーライド:
クラス AbstractSource 内の getURI

getMimeType

public String getMimeType()
インタフェース Source の記述:
データのMIME型を返します。不確定な場合はnull。

戻り値:
このデータのMIME型。

exists

public boolean exists()
インタフェース Source の記述:
データが存在すればtrueを返します。

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

getEncoding

public String getEncoding()
インタフェース Source の記述:
キャラクタ・エンコーディングを返します。未定の場合はnullです。

戻り値:
このデータのキャラクタ・エンコーディング。

isInputStream

public boolean isInputStream()
インタフェース Source の記述:
バイナリデータとして取得可能ならtrueを返します。

定義:
インタフェース Source 内の isInputStream
オーバーライド:
クラス AbstractSource 内の isInputStream

isReader

public boolean isReader()
インタフェース Source の記述:
テキストデータとして取得可能ならtrueを返します。

定義:
インタフェース Source 内の isReader
オーバーライド:
クラス AbstractSource 内の isReader

getInputStream

public InputStream getInputStream()
                           throws IOException
インタフェース Source の記述:
バイナリストリームを返します。

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

getReader

public Reader getReader()
                 throws IOException
インタフェース Source の記述:
テキストストリームを返します。

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

getFile

public File getFile()
インタフェース Source の記述:
ファイルとして返します。

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

getLength

public long getLength()
               throws IOException
インタフェース Source の記述:
データのサイズを返します。不明な場合は-1を返します。

戻り値:
データのバイト数。
例外:
IOException

getValidity

public SourceValidity getValidity()
インタフェース Source の記述:
データの変更情報を返します。

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


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