Lizzy v1.1.1

christophedelory.io
Class IOUtils

java.lang.Object
  extended by christophedelory.io.IOUtils

public final class IOUtils
extends Object

General IO manipulation.

Version:
$Revision: 55 $
Author:
Christophe Delory

Method Summary
static String toString(InputStream in, String encoding)
          Copies the contents of the specified input stream to a string, using the specified character encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toString

public static String toString(InputStream in,
                              String encoding)
                       throws IOException
Copies the contents of the specified input stream to a string, using the specified character encoding.

Parameters:
in - an input stream. Shall not be null.
encoding - the encoding to use. May be null (in this case, the default platform one will be used).
Returns:
a string. Shall not be null.
Throws:
NullPointerException - if in is null.
IOException - if an I/O error occurs.
UnsupportedEncodingException - if the named charset is not supported.

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.