Package org.daisy.braille.tools
Class FileTools
java.lang.Object
org.daisy.braille.tools.FileTools
Provides common file tools useful for braille.
- Author:
- Joel HÃ¥kansson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copy
(InputStream is, OutputStream os) Copies an input stream to an output streamstatic File[]
Lists files in a directory with a given extension.static URL[]
Converts an array of File objects into URL's
-
Constructor Details
-
FileTools
public FileTools()
-
-
Method Details
-
copy
Copies an input stream to an output stream- Parameters:
is
- the input streamos
- the output stream- Throws:
IOException
- if IO fails
-
listFiles
Lists files in a directory with a given extension.- Parameters:
dir
- the directory to list files inext
- the extension to test- Returns:
- returns an array of files with the specified extension
-
toURL
Converts an array of File objects into URL's- Parameters:
files
- the files to convert- Returns:
- returns an array of URL's
-