public abstract class InputStreamHelper extends Object
InputStream.| Modifier and Type | Method and Description |
|---|---|
static byte[] |
readAllBytes(InputStream is)
Reads all remaining bytes from the input stream.This method blocks until
all remaining bytes have been read and end of stream is detected, or an
exception is thrown.
|
public static byte[] readAllBytes(InputStream is) throws IOException
is - the InputStream to useIOException - if an I/O error occursOutOfMemoryError - if an array of the required size cannot be
allocated. For example, if an array larger than 2GB would
be required to store the bytes.Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.