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
IOExceptionpublic static File copyInTempFile(InputStream input, String fileExtension) throws IOException
IOExceptionpublic static List<String> recursiveListFile(File folder, String prefix, Predicate<File> filter)
public static byte[] readBytesFromInputStream(InputStream input) throws IOException
IOExceptionpublic static byte[] readBytesFromInputStream(InputStream input, boolean closeInput) throws IOException
IOExceptionpublic static byte[] readBytesFromZipEntry(File file, ZipEntry entry) throws IOException
IOExceptionpublic static byte[] readBytes(File f) throws IOException
IOExceptionpublic static void write(File f, byte[] data) throws IOException
IOExceptionpublic static void writeBytes(File f, byte[] data) throws IOException
IOExceptionpublic static boolean areByteArraysEqual(byte[] b1,
byte[] b2)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.