public enum IOTools extends Enum<IOTools>
| Modifier and Type | Method and Description |
|---|---|
static void |
clean(ByteBuffer bb) |
static void |
createDirectories(Path dir) |
static boolean |
deleteDirWithFiles(File dir) |
static boolean |
deleteDirWithFiles(File dir,
int maxDepth) |
static boolean |
deleteDirWithFiles(String dir) |
static boolean |
deleteDirWithFiles(String dir,
int maxDepth) |
static InputStream |
open(URL url) |
static byte[] |
readAsBytes(InputStream is) |
static byte[] |
readFile(Class clazz,
String name) |
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 URL |
urlFor(ClassLoader classLoader,
String name) |
static URL |
urlFor(Class clazz,
String name) |
static URL |
urlFor(String name)
Deprecated.
|
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(@NotNull
String directory)
throws IORuntimeException
IORuntimeExceptionpublic static boolean shallowDeleteDirWithFiles(@NotNull
File dir)
throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(@NotNull
String dir)
throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(@NotNull
String dir,
int maxDepth)
throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(@NotNull
File dir)
throws IORuntimeException
IORuntimeExceptionpublic static boolean deleteDirWithFiles(@NotNull
File dir,
int maxDepth)
throws IORuntimeException
IORuntimeException@Deprecated public static URL urlFor(String name) throws FileNotFoundException
FileNotFoundException@NotNull public static URL urlFor(Class clazz, String name) throws FileNotFoundException
FileNotFoundException@NotNull public static URL urlFor(ClassLoader classLoader, String name) throws FileNotFoundException
FileNotFoundExceptionpublic static InputStream open(URL url) throws IOException
IOExceptionpublic static byte[] readFile(@NotNull
String name)
throws IOException
name - Name of the fileIOException - FileNotFoundException thrown if file is not foundpublic static byte[] readFile(Class clazz, @NotNull String name) throws IOException
IOExceptionpublic static byte[] readAsBytes(InputStream is) throws IOException
IOExceptionpublic static void writeFile(@NotNull
String filename,
@NotNull
byte[] bytes)
throws IOException
IOExceptionpublic static void clean(ByteBuffer bb)
public static void createDirectories(Path dir) throws IOException
IOExceptionCopyright © 2018. All rights reserved.