JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.io
Class IOHelper

java.lang.Object
  extended by net.sf.japi.io.IOHelper

public class IOHelper
extends Object

A class with helper methods for In- and Output.

Author:
Christian Hujer

Field Summary
static int DEFAULT_BUF_SIZE
          Default buffer size.
 
Method Summary
static void copy(InputStream in, OutputStream out)
          Copies all bytes from one stream to another using a default buffer size (see DEFAULT_BUF_SIZE).
static void copy(InputStream in, OutputStream out, int size)
          Copies all bytes from one stream to another using a specified buffer size.
static void copyBW(InputStream in, OutputStream out)
          Copies all bytes from one stream to another using a bytewise copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUF_SIZE

public static final int DEFAULT_BUF_SIZE
Default buffer size.

See Also:
Constant Field Values
Method Detail

copy

public static void copy(InputStream in,
                        OutputStream out)
                 throws IOException
Copies all bytes from one stream to another using a default buffer size (see DEFAULT_BUF_SIZE).

Parameters:
in - InputStream source
out - OutputStream destination
Throws:
IOException - on i/o problems

copy

public static void copy(InputStream in,
                        OutputStream out,
                        int size)
                 throws IOException
Copies all bytes from one stream to another using a specified buffer size.

Parameters:
in - InputStream source
out - OutputStream destination
size - buffer size in bytes
Throws:
IOException - on i/o problems

copyBW

public static void copyBW(InputStream in,
                          OutputStream out)
                   throws IOException
Copies all bytes from one stream to another using a bytewise copy.

Parameters:
in - InputStream source
out - OutputStream destination
Throws:
IOException - on i/o problems

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright