org.jbehave.core.io
Class IOUtils

java.lang.Object
  extended by org.jbehave.core.io.IOUtils

public class IOUtils
extends Object

A collection of utility methods performing I/O operations, complementing IOUtils methods provided by other libraries.


Constructor Summary
IOUtils()
           
 
Method Summary
static String toString(InputStream input, boolean close)
          Returns the content of the InputStream as a String, closing the stream afterwards if configured.
static String toString(Reader input, boolean close)
          Returns the content of the Reader as a String, closing the stream afterwards if configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

public IOUtils()
Method Detail

toString

public static String toString(InputStream input,
                              boolean close)
                       throws IOException
Returns the content of the InputStream as a String, closing the stream afterwards if configured.

Parameters:
input - the InputStream
close - the boolean to close the input afterwards
Returns:
A String with the content
Throws:
IOException
See Also:
org.apache.commons.io.IOUtils.toString(InputStream)}

toString

public static String toString(Reader input,
                              boolean close)
                       throws IOException
Returns the content of the Reader as a String, closing the stream afterwards if configured.

Parameters:
input - the Reader
close - the boolean to close the input afterwards
Returns:
A String with the content
Throws:
IOException
See Also:
org.apache.commons.io.IOUtils.toString(Reader)}


Copyright © 2003-2012. All Rights Reserved.