Package org.drools.util
Class IoUtils
java.lang.Object
org.drools.util.IoUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareByteArraysEqual(byte[] b1, byte[] b2) static StringasSystemSpecificPath(String urlPath, int colonIndex) static longcopy(InputStream input, OutputStream output) static voidstatic FilecopyInTempFile(InputStream input, String fileExtension) static intfindPort()static byte[]static byte[]static byte[]readBytesFromInputStream(InputStream input, boolean closeInput) static byte[]readBytesFromZipEntry(File file, ZipEntry entry) static StringreadFileAsString(File file) static StringreadInputStreamAsString(InputStream inputStream) static StringreadJarEntryAsString(JarFile jarFile, JarEntry jarEntry) recursiveListFile(File folder) recursiveListFile(File folder, String prefix, Predicate<File> filter) static booleanvalidPort(int port) static voidstatic voidwriteBytes(File f, byte[] data)
-
Field Details
-
UTF8_CHARSET
-
-
Constructor Details
-
IoUtils
public IoUtils()
-
-
Method Details
-
findPort
public static int findPort() -
validPort
public static boolean validPort(int port) -
readFileAsString
-
readJarEntryAsString
-
readInputStreamAsString
-
copyFile
-
copy
- Throws:
IOException
-
copyInTempFile
- Throws:
IOException
-
recursiveListFile
-
recursiveListFile
-
readBytesFromInputStream
- Throws:
IOException
-
readBytesFromInputStream
public static byte[] readBytesFromInputStream(InputStream input, boolean closeInput) throws IOException - Throws:
IOException
-
readBytesFromZipEntry
- Throws:
IOException
-
readBytes
- Throws:
IOException
-
write
- Throws:
IOException
-
writeBytes
- Throws:
IOException
-
areByteArraysEqual
public static boolean areByteArraysEqual(byte[] b1, byte[] b2) -
asSystemSpecificPath
-