public class IOSystem extends Object
| Constructor and Description |
|---|
IOSystem() |
| Modifier and Type | Method and Description |
|---|---|
void |
close(Closeable closeable) |
void |
copy(byte[] from,
File to) |
void |
copy(InputStream from,
File to) |
InputStream |
read(File source) |
byte[] |
read(InputStream in) |
String |
slurp(File file) |
String |
slurp(URL url) |
ZipInputStream |
unzip(File file) |
OutputStream |
write(File destination) |
void |
writeString(File file,
String string) |
public String slurp(File file) throws IOException
IOExceptionpublic String slurp(URL url) throws IOException
IOExceptionpublic void writeString(File file, String string) throws IOException
IOExceptionpublic void copy(InputStream from, File to) throws IOException
IOExceptionpublic void copy(byte[] from,
File to)
throws IOException
IOExceptionpublic ZipInputStream unzip(File file) throws IOException
IOExceptionpublic void close(Closeable closeable) throws IOException
IOExceptionpublic OutputStream write(File destination) throws FileNotFoundException
FileNotFoundExceptionpublic InputStream read(File source) throws FileNotFoundException
FileNotFoundExceptionpublic byte[] read(InputStream in) throws IOException
IOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.