| Modifier | Constructor and Description |
|---|---|
private |
FileSource(File file) |
private |
FileSource(URL url) |
| Modifier and Type | Method and Description |
|---|---|
Source |
append(Source child)
Returns a source whose path concatenates this with a child.
|
File |
file() |
InputStream |
openStream() |
String |
path() |
String |
protocol() |
Reader |
reader() |
Source |
relative(Source parent)
Returns a relative source, if this source is a child of a given base.
|
String |
toString() |
Source |
trim(String suffix)
Looks for a suffix on a path and returns
either the path with the suffix removed
or the original path.
|
Source |
trimOrNull(String suffix)
Looks for a suffix on a path and returns
either the path with the suffix removed
or null.
|
URL |
url() |
public Reader reader() throws IOException
reader in interface SourceIOExceptionpublic InputStream openStream() throws IOException
openStream in interface SourceIOExceptionpublic Source trim(String suffix)
Sourcepublic Source trimOrNull(String suffix)
SourcetrimOrNull in interface Sourcepublic Source append(Source child)
SourceFor example,
public Source relative(Source parent)
SourceFor example,
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.