public class IoUtils extends Object
| Constructor and Description |
|---|
IoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanDirectory(File directory) |
static long |
copy(InputStream input,
OutputStream output) |
static long |
copy(Reader input,
Writer output) |
static void |
copyFile(String source,
String target) |
static void |
delete(File fileOrDir) |
static boolean |
isGzipStream(byte[] bytes) |
static List<String> |
readLines(Reader input) |
static String |
toString(InputStream input,
String encoding) |
static String |
toString(Reader reader) |
static byte[] |
tryDecompress(byte[] raw) |
public static String toString(InputStream input, String encoding)
public static String toString(Reader reader) throws IOException
IOExceptionpublic static long copy(Reader input, Writer output) throws IOException
IOExceptionpublic static long copy(InputStream input, OutputStream output) throws IOException
IOExceptionpublic static List<String> readLines(Reader input) throws IOException
IOExceptionpublic static void copyFile(String source, String target) throws IOException
IOExceptionpublic static void delete(File fileOrDir) throws IOException
IOExceptionpublic static void cleanDirectory(File directory) throws IOException
IOExceptionpublic static boolean isGzipStream(byte[] bytes)
Copyright © 2018–2019 Alibaba Group. All rights reserved.