public class IOUtils
extends java.lang.Object
IOUtils
provides static utility functions for IO manipulations.
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
readInputStreamContentAsString(java.io.InputStream in)
Reads the content of the provided
InputStream object and returns it as a String. |
static void |
writeStringToStream(java.io.OutputStream outputStream,
java.lang.String data)
Writes the provided data in the
OutputStream . |
public static void writeStringToStream(java.io.OutputStream outputStream, java.lang.String data) throws java.io.IOException
Writes the provided data in the OutputStream
.
outputStream
- the OutputStream
to which the data must be writtendata
- the data to be writtenjava.io.IOException
- in case of error when writing in the OutputStream
public static java.lang.String readInputStreamContentAsString(java.io.InputStream in) throws java.io.IOException
Reads the content of the provided InputStream
object and returns it as a String.
BufferedReader
to read the file.in
- the InputStream
from which data must be readjava.io.IOException
- in case of error when reading the InputStream