|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jnati.FileUtils
public class FileUtils
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static void |
copyStreamToStream(InputStream in,
OutputStream out)
Copys the entire contents of an InputStream to an OutputStream. |
static boolean |
delTree(File dir)
Deletes a directory and its contents. |
static File |
getTmpDir()
Creates a temporary directory in the default system location. |
static File |
getTmpDir(File root)
Creates a temporary directory in the specified location, or the default system location if the specified location is set to null. |
static File |
getTmpDir(String path)
Creates a temporary directory in the specified location, or the default system location if the specified location is set to null. |
static byte[] |
readBytes(InputStream in)
Reads the entire contents of an InputStream into an array of bytes. |
static String |
readString(Reader in)
Reads entire contents of reader into a string. |
static void |
writeStreamToFile(InputStream in,
File file)
Writes the contents of an input stream to a file. |
static void |
writeString(File file,
String string)
Writes the contents of a string to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static File getTmpDir()
throws IOException
IOException
public static File getTmpDir(String path)
throws IOException
path -
IOException
public static File getTmpDir(File root)
throws IOException
path -
IOExceptionpublic static boolean delTree(File dir)
dir -
public static void writeStreamToFile(InputStream in,
File file)
throws IOException
in - Input stream providing file contentsfile - File to write to
IOException
public static void copyStreamToStream(InputStream in,
OutputStream out)
throws IOException
in - out -
IOException
public static byte[] readBytes(InputStream in)
throws IOException
in -
IOException
public static String readString(Reader in)
throws IOException
in -
IOException
public static void writeString(File file,
String string)
throws IOException
file - string -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||