@Deprecated public final class ByteStreams extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(InputStream in,
OutputStream to)
Deprecated.
this is an internal method to dropwizard-util. Consider apache-commons instead.
|
static byte[] |
toByteArray(InputStream in)
Deprecated.
For users of Java 11+, consider
InputStream#readAllBytes() instead. |
public static byte[] toByteArray(InputStream in) throws IOException
InputStream#readAllBytes() instead.InputStream to a byte[].in - the InputStream to convertbyte[] representing the contents of the InputStreamIOException - If an I/O error occurspublic static void copy(InputStream in, OutputStream to) throws IOException
InputStream to an OutputStream.in - the source streamto - the target streamIOException - If an I/O error occursCopyright © 2011. All rights reserved.