Modifier and Type | Field and Description |
---|---|
private java.io.File |
file |
Constructor and Description |
---|
FileAsset(java.io.File file)
Load the specified File.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getSource()
Returns the loaded file.
|
java.io.InputStream |
openStream()
Opens a new FileInputStream for the given File.
|
java.lang.String |
toString() |
public FileAsset(java.io.File file)
file
- The file to loadjava.lang.IllegalArgumentException
- File can not be nulljava.lang.IllegalArgumentException
- File must existpublic java.io.InputStream openStream()
openStream
in interface Asset
InputStream
for each calljava.lang.RuntimeException
- If the file is not found.public java.io.File getSource()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()