public final class StreamUtil extends Object
| Constructor and Description |
|---|
StreamUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
pump(InputStream is,
OutputStream os)
Pumps one stream to another, with a buffer - both streams are
closed when the pump is complete.
|
static void |
pumpExactly(InputStream is,
OutputStream os,
int bytes) |
static byte[] |
readFully(InputStream is) |
static String |
readToString(InputStream is)
Reads all remaining bytes from a stream and returns it
as a string.
|
static void |
unbufferedPump(InputStream is,
OutputStream os) |
public static final void pump(InputStream is, OutputStream os) throws IOException
IOExceptionpublic static final void unbufferedPump(InputStream is, OutputStream os) throws IOException
IOExceptionpublic static final void pumpExactly(InputStream is, OutputStream os, int bytes) throws IOException
IOExceptionpublic static String readToString(InputStream is) throws IOException
IOExceptionpublic static byte[] readFully(InputStream is) throws IOException
IOExceptionCopyright © 2014. All rights reserved.