public class DataSource extends AbstractSource
uri
Constructor and Description |
---|
DataSource(URI uri) |
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()
テキストストリームを返します。
|
SourceValidity |
getValidity()
データの変更情報を返します。
|
boolean |
isFile()
ファイルならtrueを返します。
|
boolean |
isInputStream()
バイナリデータとして取得可能ならtrueを返します。
|
boolean |
isReader()
テキストデータとして取得可能ならtrueを返します。
|
close, getURI
public DataSource(URI uri)
public String getMimeType() throws IOException
Source
IOException
public String getEncoding()
Source
public boolean exists() throws IOException
Source
IOException
public boolean isFile() throws IOException
Source
isFile
in interface Source
isFile
in class AbstractSource
IOException
public boolean isInputStream() throws IOException
Source
isInputStream
in interface Source
isInputStream
in class AbstractSource
IOException
public boolean isReader() throws IOException
Source
isReader
in interface Source
isReader
in class AbstractSource
IOException
public InputStream getInputStream() throws IOException
Source
IOException
public Reader getReader() throws IOException
Source
IOException
public File getFile()
Source
public long getLength() throws IOException
Source
IOException
public SourceValidity getValidity() throws IOException
Source
IOException
Copyright © 2018 座間ソフト. All rights reserved.