|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.compress.utils.IOUtils
public final class IOUtils
Utility functions
| Method Summary | |
|---|---|
static long |
copy(InputStream input,
OutputStream output)
Copies the content of a InputStream into an OutputStream. |
static long |
copy(InputStream input,
OutputStream output,
int buffersize)
Copies the content of a InputStream into an OutputStream |
static byte[] |
toByteArray(InputStream input)
Gets the contents of an InputStream as a byte[]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static long copy(InputStream input,
OutputStream output)
throws IOException
input - the InputStream to copyoutput - the target Stream
IOException - if an error occurs
public static long copy(InputStream input,
OutputStream output,
int buffersize)
throws IOException
input - the InputStream to copyoutput - the target Streambuffersize - the buffer size to use
IOException - if an error occurs
public static byte[] toByteArray(InputStream input)
throws IOException
InputStream as a byte[].
This method buffers the input internally, so there is no need to use a
BufferedInputStream.
input - the InputStream to read from
NullPointerException - if the input is null
IOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||