public class URLSource extends AbstractSource
uri
Constructor and Description |
---|
URLSource(URI uri) |
URLSource(URI uri,
String mimeType) |
URLSource(URI uri,
String mimeType,
String encoding) |
URLSource(URI uri,
URL url,
String mimeType,
String encoding) |
URLSource(URL url) |
URLSource(URL url,
String mimeType) |
URLSource(URL url,
String mimeType,
String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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を返します。
|
getURI
public URLSource(URL url, String mimeType, String encoding) throws URISyntaxException
URISyntaxException
public URLSource(URL url, String mimeType) throws URISyntaxException
URISyntaxException
public URLSource(URL url) throws URISyntaxException
URISyntaxException
public URLSource(URI uri, String mimeType, String encoding) throws MalformedURLException
MalformedURLException
public URLSource(URI uri, String mimeType) throws MalformedURLException
MalformedURLException
public URLSource(URI uri) throws MalformedURLException
MalformedURLException
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 void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractSource
public File getFile()
Source
public long getLength() throws IOException
Source
IOException
public SourceValidity getValidity() throws IOException
Source
IOException
Copyright © 2018 座間ソフト. All rights reserved.