net.sourceforge.cobertura.util
public abstract class IOUtil extends Object
Method Summary | |
---|---|
static InputStream | closeInputStream(InputStream in)
Closes an input stream.
|
static OutputStream | closeOutputStream(OutputStream out)
Closes an output stream.
|
static void | copyStream(InputStream in, OutputStream out)
Copies bytes from input stream into the output stream. |
static byte[] | createByteArrayFromInputStream(InputStream in)
Returns an array that contains values read from the
given input stream.
|
static PrintWriter | getPrintWriter(File file) |
static void | moveFile(File sourceFile, File destinationFile)
Moves a file from one location to other.
|
Parameters: in The stream to close.
Returns: null unless an exception was thrown while closing, else returns the stream
Parameters: out The stream to close.
Returns: null unless an exception was thrown while closing, else returns the stream.
Throws: IOException If either passed stream will throw IOException. NullPointerException If either passed stream is null.
Throws: NullPointerException If null stream is passed.
Throws: IOException If IO exception occur during moving. NullPointerException If either passed file is null.