public final class FileUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSPATH_PREFIX |
static String |
FILE_PATH_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
getStream(String resourcePath)
It returns an
InputStream on the resource. |
public static final String FILE_PATH_PREFIX
public static final String CLASSPATH_PREFIX
public static InputStream getStream(String resourcePath) throws FileNotFoundException
InputStream on the resource.
The resourcePath can be:
- ./path/file : path of a file in the filesystem
- file:./path/file : same as previous case, a path of a file in the filesystem
- classpath:/path/file : path of a resource in the classpathpath - FileNotFoundExceptionCopyright © 2019. All rights reserved.