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