public class FileTools
extends java.lang.Object
Constructor and Description |
---|
FileTools() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(java.io.InputStream is,
java.io.OutputStream os)
Copies an input stream to an output stream
|
static java.io.File[] |
listFiles(java.io.File dir,
java.lang.String ext)
Lists files in a directory with a given extension.
|
static java.net.URL[] |
toURL(java.io.File[] files)
Converts an array of File objects into URL's
|
public static void copy(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOException
is
- the input streamos
- the output streamjava.io.IOException
- if IO failspublic static java.io.File[] listFiles(java.io.File dir, java.lang.String ext)
dir
- the directory to list files inext
- the extension to testpublic static java.net.URL[] toURL(java.io.File[] files)
files
- the files to convert