public class IO extends Object
| Constructor and Description |
|---|
IO() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Closeable closeable) |
static void |
copy(File from,
OutputStream to) |
static void |
copy(InputStream from,
File to) |
static void |
copy(InputStream from,
File to,
boolean append) |
static void |
copy(InputStream from,
OutputStream to) |
static void |
copy(URL from,
OutputStream to) |
static boolean |
delete(File file) |
static InputStream |
read(File source) |
static InputStream |
read(URL source) |
static byte[] |
readBytes(File file) |
static byte[] |
readBytes(InputStream in) |
static byte[] |
readBytes(URL url) |
static String |
readString(File file) |
static String |
readString(URL url) |
static String |
slurp(File file) |
static String |
slurp(InputStream in) |
static String |
slurp(String fileName) |
static String |
slurp(URL url) |
static ZipInputStream |
unzip(File file) |
static OutputStream |
write(File destination) |
static OutputStream |
write(File destination,
boolean append) |
static void |
writeString(File file,
String string) |
static ZipOutputStream |
zip(File file) |
public static String readString(URL url) throws IOException
IOExceptionpublic static String readString(File file) throws IOException
IOExceptionpublic static String slurp(String fileName) throws IOException
IOExceptionpublic static String slurp(File file) throws IOException
IOExceptionpublic static byte[] readBytes(File file) throws IOException
IOExceptionpublic static String slurp(InputStream in) throws IOException
IOExceptionpublic static byte[] readBytes(InputStream in) throws IOException
IOExceptionpublic static String slurp(URL url) throws IOException
IOExceptionpublic static byte[] readBytes(URL url) throws IOException
IOExceptionpublic static void writeString(File file, String string) throws IOException
IOExceptionpublic static void copy(File from, OutputStream to) throws IOException
IOExceptionpublic static void copy(URL from, OutputStream to) throws IOException
IOExceptionpublic static void copy(InputStream from, File to) throws IOException
IOExceptionpublic static void copy(InputStream from, File to, boolean append) throws IOException
IOExceptionpublic static void copy(InputStream from, OutputStream to) throws IOException
IOExceptionpublic static ZipOutputStream zip(File file) throws IOException
IOExceptionpublic static ZipInputStream unzip(File file) throws IOException
IOExceptionpublic static void close(Closeable closeable) throws IOException
IOExceptionpublic static boolean delete(File file)
public static OutputStream write(File destination) throws FileNotFoundException
FileNotFoundExceptionpublic static OutputStream write(File destination, boolean append) throws FileNotFoundException
FileNotFoundExceptionpublic static InputStream read(File source) throws FileNotFoundException
FileNotFoundExceptionpublic static InputStream read(URL source) throws IOException
IOExceptionCopyright © 1999–2020 The Apache Software Foundation. All rights reserved.