public class FileSource extends java.lang.Object implements Source
File as a source.| Modifier and Type | Field and Description |
|---|---|
private java.io.File |
file |
| Constructor and Description |
|---|
FileSource(java.io.File file)
Creates a new source backed by the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getFile()
Gets the file of this source.
|
java.io.InputStream |
getInputStream()
Gets a byte stream to the source contents.
|
java.lang.String |
getLocation()
Provides a user-friendly hint about the location of the source.
|
java.lang.String |
toString() |
public FileSource(java.io.File file)
file - The file, must not be null.public java.io.InputStream getInputStream()
throws java.io.IOException
SourcegetInputStream in interface Sourcenull.java.io.IOExceptionpublic java.lang.String getLocation()
SourcegetLocation in interface Sourcenull.public java.io.File getFile()
null.public java.lang.String toString()
toString in class java.lang.Object