Class FileUtils
java.lang.Object
org.activiti.cloud.services.common.util.FileUtils
Utils for handling files
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoaderGet current class loaderstatic byte[]resourceAsByteArray(String path) Get classpath resource as byte arrayresourceAsFile(String name) Get classpath resource as filestatic Optional<InputStream> resourceAsStream(String name) Get classpath resource as file
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
resourceAsByteArray
Get classpath resource as byte array- Parameters:
path- the path of the resource- Returns:
- the byte array of the resource
- Throws:
IOException- if the resource cannot be read
-
resourceAsFile
Get classpath resource as file- Parameters:
name- the name of the resource- Returns:
- the resource file, or
Optional.EMPTY
-
resourceAsStream
Get classpath resource as file- Parameters:
name- the name of the resource- Returns:
- the resource file, or
Optional.EMPTY
-
classLoader
Get current class loader- Returns:
- the current class loader
-