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 Summary
Modifier and TypeMethodDescriptionstatic void
copyResource
(String resourceName, File out) Copy a resource from the classpath into a filestatic boolean
existsResource
(String resourceName) static InputStream
getInputStream
(String resourceName) static byte[]
readAsBytes
(String resourceName) static String
readAsString
(String resourceName)
-
Method Details
-
readAsBytes
- Throws:
IOException
-
readAsString
- Throws:
IOException
-
copyResource
Copy a resource from the classpath into a file- Parameters:
resourceName
- The resource fully qualified nameout
- The target file- Throws:
IOException
- raised in case the resource does not exist or the output file cannot be written
-
existsResource
-
getInputStream
-