public enum IOTools extends Enum<IOTools>
| Modifier and Type | Method and Description |
|---|---|
static void |
clean(ByteBuffer bb) |
static boolean |
deleteDirWithFiles(File dir,
int maxDepth) |
static boolean |
deleteDirWithFiles(String dir,
int maxDepth) |
static byte[] |
readFile(String name)
This method first looks for the file in the classpath.
|
static boolean |
shallowDeleteDirWithFiles(File dir) |
static boolean |
shallowDeleteDirWithFiles(String directory) |
static String |
tempName(String filename) |
static IOTools |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IOTools[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static void |
writeFile(String filename,
byte[] bytes) |
public static IOTools[] values()
for (IOTools c : IOTools.values()) System.out.println(c);
public static IOTools valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static boolean shallowDeleteDirWithFiles(String directory) throws IORuntimeException
IORuntimeExceptionpublic static boolean shallowDeleteDirWithFiles(File dir) throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(String dir, int maxDepth) throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(File dir, int maxDepth) throws IORuntimeException
IORuntimeExceptionpublic static byte[] readFile(String name) throws IOException
name - Name of the fileIOException - FileNotFoundException thrown if file is not foundpublic static void writeFile(String filename, byte[] bytes) throws IOException
IOExceptionpublic static void clean(ByteBuffer bb)
Copyright © 2016. All rights reserved.