|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.could.util.StreamTools
An utility class providing various static methods operating on
input
and output
streams.
Method Summary | |
static long |
copy(InputStream in,
OutputStream out)
Copy every byte from the specified InputStream to the specifed
OutputStream and then close both of them. |
static long |
copy(InputStream in,
OutputStream out,
boolean close)
Copy every byte from the specified InputStream to the specifed
OutputStream and then optionally close both of them. |
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 in, OutputStream out) throws IOException
Copy every byte from the specified InputStream
to the specifed
OutputStream
and then close both of them.
This method is equivalent to a call to the following method:
copy(in, out, true)
.
in
- the InputStream
to read bytes from.out
- the OutputStream
to write bytes to.
IOException
- if an I/O error occurred copying the data.public static long copy(InputStream in, OutputStream out, boolean close) throws IOException
Copy every byte from the specified InputStream
to the specifed
OutputStream
and then optionally close both of them.
in
- the InputStream
to read bytes from.out
- the OutputStream
to write bytes to.close
- whether to close the streams or not.
IOException
- if an I/O error occurred copying the data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |