public class IOUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE
Default buffer size for stream utility methods
|
| Constructor and Description |
|---|
IOUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
closeStream(InputStream in) |
static boolean |
closeStream(OutputStream out) |
static void |
copy(InputStream in,
OutputStream out)
Copy from an input stream to an output stream.
|
static void |
copy(InputStream in,
OutputStream out,
long count)
Copy the specified number of bytes from an input stream to an output
stream.
|
static void |
copy(InputStream in,
OutputStream out,
long count,
int bufferSize)
Copy the specified number of bytes from an input stream to an output
stream.
|
static void |
copyFile(File from,
File to) |
static boolean |
delTree(File file) |
static void |
recurseDeleteDirectory(File dir) |
public static int BUFFER_SIZE
public static void copy(InputStream in, OutputStream out) throws IOException
in - input streamout - output streamIOException - on any errorpublic static void copy(InputStream in, OutputStream out, long count) throws IOException
in - input streamout - output streamcount - number of bytes to copyIOException - on any errorpublic static void copy(InputStream in, OutputStream out, long count, int bufferSize) throws IOException
in - input streamout - output streamcount - number of bytes to copybufferSize - buffer sizeIOException - on any errorpublic static boolean closeStream(InputStream in)
in - public static boolean closeStream(OutputStream out)
out - public static boolean delTree(File file)
public static void recurseDeleteDirectory(File dir)
public static void copyFile(File from, File to) throws IOException
IOExceptionCopyright © 2014. All rights reserved.