public class IoUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
UTF8_CHARSET |
Constructor and Description |
---|
IoUtils() |
Modifier and Type | Method and Description |
---|---|
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) |
public static final Charset UTF8_CHARSET
public static int findPort()
public static boolean validPort(int port)
public static List<String> recursiveListFile(File folder, String prefix, Predicate<? super File> filter)
public static byte[] readBytesFromInputStream(InputStream input) throws IOException
IOException
public static byte[] readBytesFromZipEntry(File file, ZipEntry entry) throws IOException
IOException
public static byte[] readBytes(File f) throws IOException
IOException
public static void write(File f, byte[] data) throws IOException
IOException
public static void writeBytes(File f, byte[] data) throws IOException
IOException
public static boolean areByteArraysEqual(byte[] b1, byte[] b2)
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.