public class FileUtils
extends java.lang.Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
chmod(java.lang.String mode,
java.lang.String path) |
static void |
closeQuietly(java.io.Closeable closeable)
Closes 'closeable', ignoring any checked exceptions.
|
static void |
deleteDirectoryQuickly(java.io.File dir)
Try to delete directory in a fast way.
|
static void |
deleteDirectoryRecursively(java.io.File dir)
recursively delete
|
static void |
deleteIfExists(java.io.File file) |
static java.lang.String |
readAsciiLine(java.io.InputStream in)
Returns the ASCII characters up to but not including the next "\r\n", or
"\n".
|
static java.lang.String |
readFully(java.io.Reader reader)
Returns the remainder of 'reader' as a string, closing it when done.
|
static java.lang.String |
readString(java.lang.String filePath) |
static boolean |
writeString(java.lang.String filePath,
java.lang.String content) |
public static java.lang.String readFully(java.io.Reader reader)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String readAsciiLine(java.io.InputStream in)
throws java.io.IOException
java.io.EOFException - if the stream is exhausted before the next newline
character.java.io.IOExceptionpublic static void closeQuietly(java.io.Closeable closeable)
public static void deleteDirectoryQuickly(java.io.File dir)
throws java.io.IOException
java.io.IOExceptionpublic static void chmod(java.lang.String mode,
java.lang.String path)
public static void deleteDirectoryRecursively(java.io.File dir)
throws java.io.IOException
dir - java.io.IOExceptionpublic static void deleteIfExists(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic static boolean writeString(java.lang.String filePath,
java.lang.String content)
public static java.lang.String readString(java.lang.String filePath)