|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.util.io.FileFunction
public final class FileFunction
Functions dealing with File
s and Streams.
Method Summary | |
---|---|
static void |
provideDirectory(File directory) Checks if the given directory exits and if not, creates it. |
static File |
provideDirectory(String directoryName) Checks if a directory with the given name exits and if not, creates it. |
static void |
writeToFile(InputStream input, File file) Writes the given stream to the given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void writeToFile(InputStream input, File file) throws IOException
input
- the stream to read from.
file
- the file to write to.
IOException
- on any problem copying the stream contents to the file.
public static File provideDirectory(String directoryName) throws IOException
directoryName
- the name of the directory to ensure to exist.
IOException
- if the directory cannot be created.
public static void provideDirectory(File directory) throws IOException
directory
- the directory to ensure to exist.
IOException
- if the directory cannot be created.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |