org.apache.commons.compress.utils
Class IOUtils

java.lang.Object
  extended by org.apache.commons.compress.utils.IOUtils

public final class IOUtils
extends java.lang.Object

Utility functions


Constructor Summary
private IOUtils()
          Private constructor to prevent instantiation of this utility class.
 
Method Summary
static long copy(java.io.InputStream input, java.io.OutputStream output)
          Copies the content of a InputStream into an OutputStream.
static long copy(java.io.InputStream input, java.io.OutputStream output, int buffersize)
          Copies the content of a InputStream into an OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

private IOUtils()
Private constructor to prevent instantiation of this utility class.

Method Detail

copy

public static long copy(java.io.InputStream input,
                        java.io.OutputStream output)
                 throws java.io.IOException
Copies the content of a InputStream into an OutputStream. Uses a default buffer size of 8024 bytes.

Parameters:
input - the InputStream to copy
output - the target Stream
Throws:
java.io.IOException - if an error occurs

copy

public static long copy(java.io.InputStream input,
                        java.io.OutputStream output,
                        int buffersize)
                 throws java.io.IOException
Copies the content of a InputStream into an OutputStream

Parameters:
input - the InputStream to copy
output - the target Stream
buffersize - the buffer size to use
Throws:
java.io.IOException - if an error occurs