public class IOUtil
extends java.lang.Object
| Constructor and Description |
|---|
IOUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(java.io.Closeable obj)
Close a
Closeable object, ignoring any
IOException that might be thrown. |
static void |
copy(java.io.InputStream in,
java.io.OutputStream out)
Copy as much data as possible from given input stream to given output stream.
|
static void |
copy(java.io.InputStream in,
java.io.OutputStream out,
int sizeIncrement,
java.lang.Runnable callback)
Copy as much data as possible from given input stream to given output stream,
invoking a callback periodically (which could drive a progress bar or
other indication of progress.)
|
static void |
copy(java.io.Reader in,
java.io.Writer out)
Copy as much data as possible from given reader to given writer.
|
public static void closeQuietly(java.io.Closeable obj)
Closeable object, ignoring any
IOException that might be thrown.obj - a Closeable object to closepublic static void copy(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - an InputStreamout - an OutputStreamjava.io.IOExceptionpublic static void copy(java.io.InputStream in,
java.io.OutputStream out,
int sizeIncrement,
java.lang.Runnable callback)
throws java.io.IOException
in - an InputStreamout - an OutputStreamsizeIncrement - how often to invoke the callback (number of bytes)callback - callback to invoke periodically to indicate progressjava.io.IOExceptionpublic static void copy(java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
in - a Readerout - a Writerjava.io.IOException