DJDoc v.1.0.0b-1

net.sf.djdoc.util
Class IOUtils

java.lang.Object
  extended by net.sf.djdoc.util.IOUtils

public class IOUtils
extends java.lang.Object

This utility class contains a number of useful static methods related to Stream manipulation.


Method Summary
static void copy(java.io.InputStream input, java.io.OutputStream output)
          Reads byte data in chunks of a specified size from one stream and writes it into another stream.
static void copy(java.io.Reader input, java.io.Writer output)
          Reads character data in chunks of a specified size from a Reader and writes it into a Writer.
static java.io.File getFile(java.lang.String... fileNames)
          Returns the first existing file from a list of filenames.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static void copy(java.io.InputStream input,
                        java.io.OutputStream output)
                 throws java.io.IOException
Reads byte data in chunks of a specified size from one stream and writes it into another stream.

Parameters:
input - The InputStream from which to read the data
output - The OutputStream to which to write the data
Throws:
java.io.IOException

copy

public static void copy(java.io.Reader input,
                        java.io.Writer output)
                 throws java.io.IOException
Reads character data in chunks of a specified size from a Reader and writes it into a Writer.

Parameters:
input - The Reader from which to read the data
output - The Writer to which to write the data
Throws:
java.io.IOException

getFile

public static java.io.File getFile(java.lang.String... fileNames)
Returns the first existing file from a list of filenames.

Parameters:
fileNames - A list of names of (existing or non-existing) files
Returns:
The first existing file from the specified list

DJDoc v.1.0.0b-1