public class SourceWrapper extends Object implements Source
Constructor and Description |
---|
SourceWrapper(Source source) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
データが存在すればtrueを返します。
|
String |
getEncoding()
キャラクタ・エンコーディングを返します。未定の場合はnullです。
|
File |
getFile()
ファイルとして返します。
|
InputStream |
getInputStream()
バイナリストリームを返します。
|
long |
getLength()
データのサイズを返します。不明な場合は-1を返します。
|
String |
getMimeType()
データのMIME型を返します。不確定な場合はnull。
|
Reader |
getReader()
テキストストリームを返します。
|
URI |
getURI()
データのURIを返します。
|
SourceValidity |
getValidity()
データの変更情報を返します。
|
boolean |
isFile()
ファイルならtrueを返します。
|
boolean |
isInputStream()
バイナリデータとして取得可能ならtrueを返します。
|
boolean |
isReader()
テキストデータとして取得可能ならtrueを返します。
|
protected final Source source
public SourceWrapper(Source source)
public boolean exists() throws IOException
Source
exists
in interface Source
IOException
public String getEncoding() throws IOException
Source
getEncoding
in interface MetaSource
getEncoding
in interface Source
IOException
public InputStream getInputStream() throws IOException
Source
getInputStream
in interface Source
IOException
public long getLength() throws IOException
Source
getLength
in interface MetaSource
getLength
in interface Source
IOException
public String getMimeType() throws IOException
Source
getMimeType
in interface MetaSource
getMimeType
in interface Source
IOException
public Reader getReader() throws IOException
Source
getReader
in interface Source
IOException
public URI getURI()
Source
getURI
in interface MetaSource
getURI
in interface Source
public SourceValidity getValidity() throws IOException
Source
getValidity
in interface Source
IOException
public boolean isFile() throws IOException
Source
isFile
in interface Source
IOException
public boolean isInputStream() throws IOException
Source
isInputStream
in interface Source
IOException
public boolean isReader() throws IOException
Source
isReader
in interface Source
IOException
Copyright © 2018 座間ソフト. All rights reserved.