@ParametersAreNonnullByDefault public final class IoStreams extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
readAllBytes(InputStream input)
While waiting for Java9's
InputStream.readAllBytes() |
static long |
transfer(InputStream in,
OutputStream out)
While waiting for Java9's
InputStream.transferTo(OutputStream) |
public static byte[] readAllBytes(@WillNotClose InputStream input)
InputStream.readAllBytes()
input
- the stream to draininput
UncheckedIOException
- if an IOException
this thrownpublic static long transfer(@WillNotClose InputStream in, @WillNotClose OutputStream out)
InputStream.transferTo(OutputStream)
input
- read fromoutput
- write to, but does not closeUncheckedIOException
- if an IOException
this thrownCopyright © 2017–2018 earcam. All rights reserved.