Package com.logicaldoc.util.io
Class ResourceUtil
java.lang.Object
com.logicaldoc.util.io.ResourceUtil
Utiliry class for classpath resources IO issues
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidcopyResource(String resourceName, File out) Copy a resource from the classpath into a filestatic booleanexistsResource(String resourceName) static InputStreamgetInputStream(String resourceName) static byte[]readAsBytes(String resourceName) static StringreadAsString(String resourceName) 
- 
Method Details- 
readAsBytes- Throws:
- IOException
 
- 
readAsString- Throws:
- IOException
 
- 
copyResourceCopy a resource from the classpath into a file- Parameters:
- resourceName- The resource fully qualified name
- out- The target file
- Throws:
- IOException- raised in case the resource does not exist or the output file cannot be written
 
- 
existsResource
- 
getInputStream
 
-