Package com.kamikazejam.kamicommon.util
Class DiskUtil
java.lang.Object
com.kamikazejam.kamicommon.util.DiskUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
deleteRecursive
(@NotNull File path) static @NotNull String
static byte @NotNull []
static @Nullable String
static @NotNull String
utf8
(byte[] bytes) static byte @NotNull []
static void
static void
writeBytes
(@NotNull File file, byte @NotNull [] bytes) static boolean
writeCatch
(File file, String content)
-
Constructor Details
-
DiskUtil
public DiskUtil()
-
-
Method Details
-
readBytes
- Throws:
IOException
-
writeBytes
public static void writeBytes(@NotNull @NotNull File file, byte @NotNull [] bytes) throws IOException - Throws:
IOException
-
write
public static void write(@NotNull @NotNull File file, @NotNull @NotNull String content) throws IOException - Throws:
IOException
-
read
@Contract("_ -> new") @NotNull public static @NotNull String read(@NotNull @NotNull File file) throws IOException - Throws:
IOException
-
writeCatch
-
readCatch
-
deleteRecursive
- Throws:
FileNotFoundException
-
utf8
-
utf8
-