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 long |
copy(InputStream input,
OutputStream output) |
static void |
copyFile(File sourceFile,
File destFile) |
static File |
copyInTempFile(InputStream input,
String fileExtension) |
static int |
findPort() |
static byte[] |
readBytes(File f) |
static byte[] |
readBytesFromInputStream(InputStream input) |
static byte[] |
readBytesFromInputStream(InputStream input,
boolean closeInput) |
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<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 long copy(InputStream input, OutputStream output) throws IOException
IOException
public static File copyInTempFile(InputStream input, String fileExtension) throws IOException
IOException
public static List<String> recursiveListFile(File folder, String prefix, Predicate<File> filter)
public static byte[] readBytesFromInputStream(InputStream input) throws IOException
IOException
public static byte[] readBytesFromInputStream(InputStream input, boolean closeInput) 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–2018 JBoss by Red Hat. All rights reserved.