org.mmbase.util
Class IOUtil

java.lang.Object
  extended by org.mmbase.util.IOUtil

public final class IOUtil
extends Object

Various utils to consisely and efficiently deal with streams

Since:
MMBase-1.9.1
Version:
$Id: IOUtil.java 41036 2010-02-15 22:30:54Z michiel $

Method Summary
static long copy(FileInputStream input, FileOutputStream output)
           
static long copy(InputStream input, OutputStream output)
          Copy bytes from an InputStream to an OutputStream.
static long copy(InputStream input, OutputStream output, int bufferSize)
          Copy bytes from an InputStream to an OutputStream.
static long copy(Reader input, Writer output)
          Copy chars from a Reader to a Writer.
static long copy(Reader input, Writer output, int bufferSize)
          Copy chars from a Reader to a Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static long copy(InputStream input,
                        OutputStream output)
                 throws IOException
Copy bytes from an InputStream to an OutputStream.

Throws:
IOException

copy

public static long copy(FileInputStream input,
                        FileOutputStream output)
                 throws IOException
Throws:
IOException

copy

public static long copy(InputStream input,
                        OutputStream output,
                        int bufferSize)
                 throws IOException
Copy bytes from an InputStream to an OutputStream.

Parameters:
bufferSize - Size of internal buffer to use.
Throws:
IOException

copy

public static long copy(Reader input,
                        Writer output)
                 throws IOException
Copy chars from a Reader to a Writer.

Throws:
IOException

copy

public static long copy(Reader input,
                        Writer output,
                        int bufferSize)
                 throws IOException
Copy chars from a Reader to a Writer.

Parameters:
bufferSize - Size of internal buffer to use.
Throws:
IOException


MMBase 2.0-SNAPSHOT - null