Package com.logicaldoc.util.io
Class ResourceUtil
- java.lang.Object
 - 
- com.logicaldoc.util.io.ResourceUtil
 
 
- 
public class ResourceUtil extends Object
Utiliry class for classpath resources IO issues- Since:
 - 4.5
 - Author:
 - Matteo Caruso - LogicalDOC
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ResourceUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyResource(String classpath, File out)Copy a resource from the classpath into a filestatic booleanexistsResource(String resourceName)static StringreadAsString(String resourceName) 
 - 
 
- 
- 
Method Detail
- 
readAsString
public static String readAsString(String resourceName) throws IOException
- Throws:
 IOException
 
- 
copyResource
public static void copyResource(String classpath, File out) throws IOException
Copy a resource from the classpath into a file- Parameters:
 classpath- The classpath specificationout- The target file- Throws:
 IOException- raised in case the resource does not exist or the output file cannot be written
 
- 
existsResource
public static boolean existsResource(String resourceName)
 
 - 
 
 -