|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.cobertura.util.IOUtil
public abstract class IOUtil
Helper class with useful I/O operations.
| Constructor Summary | |
|---|---|
IOUtil()
|
|
| Method Summary | |
|---|---|
static java.io.InputStream |
closeInputStream(java.io.InputStream in)
Closes an input stream. |
static java.io.OutputStream |
closeOutputStream(java.io.OutputStream out)
Closes an output stream. |
static void |
copyStream(java.io.InputStream in,
java.io.OutputStream out)
Copies bytes from input stream into the output stream. |
static byte[] |
createByteArrayFromInputStream(java.io.InputStream in)
Returns an array that contains values read from the given input stream. |
static java.io.PrintWriter |
getPrintWriter(java.io.File file)
|
static void |
moveFile(java.io.File sourceFile,
java.io.File destinationFile)
Moves a file from one location to other. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOUtil()
| Method Detail |
|---|
public static void copyStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
java.io.IOException - If either passed stream will throw IOException.
java.lang.NullPointerException - If either passed stream is null.
public static byte[] createByteArrayFromInputStream(java.io.InputStream in)
throws java.io.IOException
java.lang.NullPointerException - If null stream is passed.
java.io.IOException
public static void moveFile(java.io.File sourceFile,
java.io.File destinationFile)
throws java.io.IOException
java.io.IOException - If IO exception occur during moving.
java.lang.NullPointerException - If either passed file is null.public static java.io.InputStream closeInputStream(java.io.InputStream in)
in - The stream to close.
public static java.io.OutputStream closeOutputStream(java.io.OutputStream out)
out - The stream to close.
public static java.io.PrintWriter getPrintWriter(java.io.File file)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||