public class HttpSource extends AbstractSource
uri
Constructor and Description |
---|
HttpSource(URI uri,
org.apache.http.impl.client.CloseableHttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected org.apache.http.client.methods.HttpUriRequest |
createHttpRequest() |
boolean |
exists()
データが存在すればtrueを返します。
|
String |
getEncoding()
キャラクタ・エンコーディングを返します。未定の場合はnullです。
|
File |
getFile()
ファイルとして返します。
|
org.apache.http.client.HttpClient |
getHttpClient() |
InputStream |
getInputStream()
バイナリストリームを返します。
|
long |
getLength()
データのサイズを返します。不明な場合は-1を返します。
|
String |
getMimeType()
データのMIME型を返します。不確定な場合はnull。
|
Reader |
getReader()
テキストストリームを返します。
|
SourceValidity |
getValidity()
データの変更情報を返します。
|
boolean |
isInputStream()
バイナリデータとして取得可能ならtrueを返します。
|
boolean |
isReader()
テキストデータとして取得可能ならtrueを返します。
|
protected void |
tryConnect() |
getURI, isFile
public HttpSource(URI uri, org.apache.http.impl.client.CloseableHttpClient httpClient)
public org.apache.http.client.HttpClient getHttpClient()
public String getMimeType() throws IOException
Source
IOException
public String getEncoding() throws IOException
Source
IOException
public boolean exists() throws IOException
Source
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
protected void tryConnect() throws IOException
IOException
protected org.apache.http.client.methods.HttpUriRequest createHttpRequest()
public Reader getReader() throws IOException
Source
IOException
public File getFile()
Source
public long getLength() throws IOException
Source
IOException
public SourceValidity getValidity()
Source
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractSource
Copyright © 2018 座間ソフト. All rights reserved.