org.apache.cactus.util
Class IoUtil

java.lang.Object
  extended byorg.apache.cactus.util.IoUtil

public class IoUtil
extends java.lang.Object

Various utility methods for manipulating IO streams.

Version:
$Id: IoUtil.java,v 1.5 2003/05/26 11:45:22 cmlenz Exp $
Author:
Vincent Massol

Constructor Summary
IoUtil()
           
 
Method Summary
static java.lang.String getText(java.io.InputStream theStream)
           
static java.lang.String getText(java.io.InputStream theStream, java.lang.String theCharsetName)
          Read all data in an Input stream and return them as a String object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoUtil

public IoUtil()
Method Detail

getText

public static java.lang.String getText(java.io.InputStream theStream)
                                throws java.io.IOException
Throws:
java.io.IOException
See Also:
getText(InputStream, String)

getText

public static java.lang.String getText(java.io.InputStream theStream,
                                       java.lang.String theCharsetName)
                                throws java.io.IOException
Read all data in an Input stream and return them as a String object.

Parameters:
theStream - the input stream from which to read the data
theCharsetName - the charset name with which to read the data
Returns:
the string representation of the data
Throws:
java.io.IOException - if an error occurs during the read of data


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