public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
classLoader()
Get current class loader
|
static byte[] |
resourceAsByteArray(String path)
Get classpath resource as byte array
|
static Optional<File> |
resourceAsFile(String name)
Get classpath resource as file
|
static Optional<InputStream> |
resourceAsStream(String name)
Get classpath resource as file
|
public static byte[] resourceAsByteArray(String path) throws IOException
path - the path of the resourceIOException - if the resource cannot be readpublic static Optional<File> resourceAsFile(String name)
name - the name of the resourceOptional.EMPTYpublic static Optional<InputStream> resourceAsStream(String name)
name - the name of the resourceOptional.EMPTYpublic static ClassLoader classLoader()
Copyright © 2017–2018 Alfresco. All rights reserved.