org.apache.catalina.util

Class IOTools

public class IOTools extends Object

Contains commonly needed I/O-related methods

Author: Dan Sandberg

Field Summary
protected static intDEFAULT_BUFFER_SIZE
Method Summary
static voidflow(Reader reader, Writer writer, char[] buf)
Read input from reader and write it to writer until there is no more input from reader.
static voidflow(Reader reader, Writer writer)
static voidflow(InputStream is, OutputStream os, byte[] buf)
Read input from input stream and write it to output stream until there is no more input from input stream.
static voidflow(InputStream is, OutputStream os)

Field Detail

DEFAULT_BUFFER_SIZE

protected static final int DEFAULT_BUFFER_SIZE

Method Detail

flow

public static void flow(Reader reader, Writer writer, char[] buf)
Read input from reader and write it to writer until there is no more input from reader.

Parameters: reader the reader to read from. writer the writer to write to. buf the char array to use as a bufferx

flow

public static void flow(Reader reader, Writer writer)

See Also: ( Reader, Writer, char[] )

flow

public static void flow(InputStream is, OutputStream os, byte[] buf)
Read input from input stream and write it to output stream until there is no more input from input stream.

Parameters: is input stream the input stream to read from. os output stream the output stream to write to. buf the byte array to use as a buffer

flow

public static void flow(InputStream is, OutputStream os)

See Also: ( java.io.InputStream, java.io.OutputStream, byte[] )

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.