Class IoUtils
- java.lang.Object
-
- io.automatiko.engine.services.utils.IoUtils
-
public final class IoUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static CharsetUTF8_CHARSET
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareByteArraysEqual(byte[] b1, byte[] b2)static StringasSystemSpecificPath(String urlPath, int colonIndex)static longcopy(InputStream input, OutputStream output)static byte[]readBytes(File f)static byte[]readBytesFromInputStream(InputStream input)static byte[]readBytesFromInputStream(InputStream input, boolean closeInput)static StringreadFileAsString(File file)static List<String>recursiveListFile(File folder)static List<String>recursiveListFile(File folder, String prefix, Predicate<File> filter)static StringvalueOf(Object data)static voidwrite(File f, byte[] data)static voidwriteBytes(File f, byte[] data)
-
-
-
Field Detail
-
UTF8_CHARSET
public static final Charset UTF8_CHARSET
-
-
Method Detail
-
copy
public static long copy(InputStream input, OutputStream output) throws IOException
- Throws:
IOException
-
recursiveListFile
public static List<String> recursiveListFile(File folder, String prefix, Predicate<File> filter)
-
readBytesFromInputStream
public static byte[] readBytesFromInputStream(InputStream input) throws IOException
- Throws:
IOException
-
readBytesFromInputStream
public static byte[] readBytesFromInputStream(InputStream input, boolean closeInput) throws IOException
- Throws:
IOException
-
readBytes
public static byte[] readBytes(File f) throws IOException
- Throws:
IOException
-
write
public static void write(File f, byte[] data) throws IOException
- Throws:
IOException
-
writeBytes
public static void writeBytes(File f, byte[] data) throws IOException
- Throws:
IOException
-
areByteArraysEqual
public static boolean areByteArraysEqual(byte[] b1, byte[] b2)
-
-