public class FileAsset extends Object implements Asset
Constructor and Description |
---|
FileAsset(File file)
Load the specified File.
|
Modifier and Type | Method and Description |
---|---|
File |
getSource()
Returns the loaded file.
|
InputStream |
openStream()
Opens a new FileInputStream for the given File.
|
String |
toString() |
public FileAsset(File file)
file
- The file to loadIllegalArgumentException
- File can not be nullIllegalArgumentException
- File must existpublic InputStream openStream()
openStream
in interface Asset
InputStream
for each callRuntimeException
- If the file is not found.public File getSource()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2016 JBoss by Red Hat. All rights reserved.