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 457 2010-05-20 02:26:26Z miyabe $
作成者:
MIYABE Tatsuhiko

フィールドの概要
 
クラス jp.cssj.resolver.helpers.AbstractSource から継承されたフィールド
uri
 
コンストラクタの概要
StreamSource(URI uri, InputStream in)
           
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)
           
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
例外:
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
例外:
IOException

StreamSource

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

StreamSource

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

StreamSource

public StreamSource(URI uri,
                    InputStream in)

StreamSource

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

StreamSource

public StreamSource(URI uri,
                    Reader reader,
                    String mimeType)
             throws IOException
例外:
IOException

StreamSource

public StreamSource(URI uri,
                    Reader reader)
             throws IOException
例外:
IOException
メソッドの詳細

getURI

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

定義:
インタフェース MetaSource 内の getURI
定義:
インタフェース Source 内の getURI
オーバーライド:
クラス AbstractSource 内の getURI
戻り値:
データの位置を示すURI。

getMimeType

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

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

exists

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

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

getEncoding

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

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

isInputStream

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

定義:
インタフェース Source 内の isInputStream
オーバーライド:
クラス AbstractSource 内の isInputStream
戻り値:
バイナリデータを取得できる場合はtrue。

isReader

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

定義:
インタフェース Source 内の isReader
オーバーライド:
クラス AbstractSource 内の isReader
戻り値:
テキストデータとして取得できる場合はtrue。

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
インタフェース MetaSource の記述:
データのサイズを返します。不明な場合は-1を返します。

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

getValidity

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

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


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