public class Source extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
protected File |
file |
protected InputStream |
inputStream |
protected Reader |
reader |
| Constructor and Description |
|---|
Source(File file) |
Source(File file,
Charset charset) |
Source(InputStream inputStream) |
Source(InputStream inputStream,
Charset charset) |
Source(Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
Reader |
createReader(byte[] cachedBytes)
If cachedBytes are not null, returns a Reader created from the cachedBytes.
|
File |
file() |
static Source |
fromString(String s) |
static Source |
fromUrl(String url) |
InputStream |
inputStream() |
Reader |
reader() |
protected final File file
protected final Reader reader
protected final InputStream inputStream
protected final Charset charset
public Source(File file)
public Source(Reader reader)
public Source(InputStream inputStream)
public Source(InputStream inputStream, Charset charset)
public static Source fromUrl(String url) throws IOException
IOExceptionpublic File file()
public Reader reader()
public InputStream inputStream()
public Reader createReader(byte[] cachedBytes) throws IOException
IOExceptionCopyright © 2020. All rights reserved.