public class IoUtil extends Object
| Constructor and Description |
|---|
IoUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeStream(InputStream in) |
static void |
copy(InputStream in,
OutputStream out) |
static void |
copy(Reader in,
Writer out) |
static byte[] |
getBytes(InputStream in) |
static byte[] |
getBytes(URL url) |
static byte[] |
getBytesAndClose(InputStream in) |
static byte[] |
getBytesAndClose(Reader in) |
static InputStream |
getInputStream(File file) |
static URL |
getURL(File file) |
static void |
write(byte[] bytes,
OutputStream out) |
public static void write(byte[] bytes,
OutputStream out)
throws IOException
IOExceptionpublic static void copy(InputStream in, OutputStream out) throws IOException
IOExceptionpublic static void copy(Reader in, Writer out) throws IOException
IOExceptionpublic static byte[] getBytes(InputStream in) throws IOException
IOExceptionpublic static byte[] getBytes(URL url) throws IOException
IOExceptionpublic static byte[] getBytesAndClose(Reader in) throws IOException
IOExceptionpublic static byte[] getBytesAndClose(InputStream in)
public static void closeStream(InputStream in)
public static InputStream getInputStream(File file)
Copyright © 2017. All rights reserved.