public class Resource extends Object
Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
static void |
copyToFile(ClassLoader cl,
String name,
File target) |
static void |
copyToFile(Class cl,
String name,
File target)
Extract a resource file
from the classloader-world into the normal file system.
|
static void |
main(String[] args)
arg[0] = classname
arg[1] = relative path from class to resource
arg[0] = filename to store
|
public static void copyToFile(Class cl, String name, File target) throws FileNotFoundException, IOException
cl
- the class relative to which the resource is adressed.name
- a path relative to this class identifying the resourcetarget
- where to copy it.FileNotFoundException
IOException
public static void copyToFile(ClassLoader cl, String name, File target) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public static void main(String[] args) throws ClassNotFoundException, FileNotFoundException, IOException
arg[0] = classname arg[1] = relative path from class to resource arg[0] = filename to store
see also the complete user documentation .