public class CachedSource extends Object implements Source
Constructor and Description |
---|
CachedSource(URI uri,
String mimeType,
String encoding,
File file) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
exists()
データが存在すればtrueを返します。
|
protected void |
finalize() |
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を返します。
|
public URI getURI()
Source
getURI
in interface MetaSource
getURI
in interface Source
public String getEncoding()
Source
getEncoding
in interface MetaSource
getEncoding
in interface Source
public String getMimeType()
Source
getMimeType
in interface MetaSource
getMimeType
in interface Source
public InputStream getInputStream() throws IOException
Source
getInputStream
in interface Source
IOException
public Reader getReader() throws IOException
Source
getReader
in interface Source
IOException
public boolean isFile()
Source
public void close()
public boolean exists() throws IOException
Source
exists
in interface Source
IOException
public boolean isInputStream() throws IOException
Source
isInputStream
in interface Source
IOException
public long getLength() throws IOException
Source
getLength
in interface MetaSource
getLength
in interface Source
IOException
public boolean isReader() throws IOException
Source
isReader
in interface Source
IOException
public SourceValidity getValidity()
Source
getValidity
in interface Source
Copyright © 2018 座間ソフト. All rights reserved.