public final class FileUtil
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static java.io.InputStream |
getFile(java.lang.String path) |
Attempts to retrieve a
InputStream representation of a file
as seen from the client's class loader resource path. |
static byte[] |
getFileAsBytes(java.lang.String path) |
Attempts to retrieve a
byte[] representation of a file
as seen from the client's class loader resource path. |
public static java.io.InputStream getFile(java.lang.String path)
InputStream
representation of a file
as seen from the client's class loader resource path.path
- a path to a file accessible through the client class loaderInputStream
representation of the file passedpublic static byte[] getFileAsBytes(java.lang.String path) throws java.io.IOException
byte[]
representation of a file
as seen from the client's class loader resource path.path
- a path to a file accessible through the client class loaderbyte[]
representation of a file accessible through the client class loader,
or an empty array if the file does not existjava.io.IOException
- if reading the file failed