Drools :: Core 6.2.0.Final

org.drools.core.util
Class IoUtils

java.lang.Object
  extended by org.drools.core.util.IoUtils

public class IoUtils
extends Object


Field Summary
static Charset UTF8_CHARSET
           
 
Constructor Summary
IoUtils()
           
 
Method Summary
static boolean areByteArraysEqual(byte[] b1, byte[] b2)
           
static String asSystemSpecificPath(String urlPath, int colonIndex)
           
static void copyFile(File sourceFile, File destFile)
           
static int findPort()
           
static Map<String,byte[]> indexZipFile(File jarFile)
           
static byte[] readBytes(File f)
           
static byte[] readBytesFromInputStream(InputStream input)
           
static byte[] readBytesFromZipEntry(File file, ZipEntry entry)
           
static String readFileAsString(File file)
           
static List<String> recursiveListFile(File folder)
           
static List<String> recursiveListFile(File folder, String prefix, Predicate<? super File> filter)
           
static boolean validPort(int port)
           
static void write(File f, byte[] data)
           
static void writeBytes(File f, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF8_CHARSET

public static final Charset UTF8_CHARSET
Constructor Detail

IoUtils

public IoUtils()
Method Detail

findPort

public static int findPort()

validPort

public static boolean validPort(int port)

readFileAsString

public static String readFileAsString(File file)

copyFile

public static void copyFile(File sourceFile,
                            File destFile)

indexZipFile

public static Map<String,byte[]> indexZipFile(File jarFile)

recursiveListFile

public static List<String> recursiveListFile(File folder)

recursiveListFile

public static List<String> recursiveListFile(File folder,
                                             String prefix,
                                             Predicate<? super File> filter)

readBytesFromInputStream

public static byte[] readBytesFromInputStream(InputStream input)
                                       throws IOException
Throws:
IOException

readBytesFromZipEntry

public static byte[] readBytesFromZipEntry(File file,
                                           ZipEntry entry)
                                    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)

asSystemSpecificPath

public static String asSystemSpecificPath(String urlPath,
                                          int colonIndex)

Drools :: Core 6.2.0.Final

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.