com.wizzardo.tools.io
Class IOTools

java.lang.Object
  extended by com.wizzardo.tools.io.IOTools

public class IOTools
extends java.lang.Object


Constructor Summary
IOTools()
           
 
Method Summary
static byte[] bytes(java.io.InputStream in)
           
static void close(java.io.Closeable c)
           
static long copy(java.io.InputStream in, java.io.OutputStream out)
          copy one stream into another with default buffer 10 KB
static long copy(java.io.InputStream in, java.io.OutputStream out, byte[] buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOTools

public IOTools()
Method Detail

close

public static void close(java.io.Closeable c)

copy

public static long copy(java.io.InputStream in,
                        java.io.OutputStream out)
                 throws java.io.IOException
copy one stream into another with default buffer 10 KB

Returns:
total length of copied data
Throws:
java.io.IOException

copy

public static long copy(java.io.InputStream in,
                        java.io.OutputStream out,
                        byte[] buffer)
                 throws java.io.IOException
Returns:
total length of copied data
Throws:
java.io.IOException

bytes

public static byte[] bytes(java.io.InputStream in)
                    throws java.io.IOException
Throws:
java.io.IOException