public class IOUtils extends Object
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
close(InputStream s) |
static long |
copy(InputStream from,
OutputStream to)
Copies all bytes from the input stream to the output stream.
|
static long |
copy(Readable from,
Appendable to)
Copies all characters between the
Readable and Appendable
objects. |
static String |
toString(Readable r)
|
public static void close(InputStream s)
public static long copy(InputStream from, OutputStream to) throws IOException
from
- the input stream to read fromto
- the output stream to write toIOException
- if an I/O error occurspublic static String toString(Readable r) throws IOException
r
- the object to read fromIOException
- if an I/O error occurspublic static long copy(Readable from, Appendable to) throws IOException
Readable
and Appendable
objects. Does not close or flush either object.from
- the object to read fromto
- the object to write toIOException
- if an I/O error occursCopyright © 2017. All Rights Reserved.