public abstract class InputStreamHelper
extends java.lang.Object
InputStream.| Modifier and Type | Method | Description |
|---|---|---|
static byte[] |
readAllBytes(java.io.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(java.io.InputStream is)
throws java.io.IOException
is - the InputStream to usejava.io.IOException - if an I/O error occursjava.lang.OutOfMemoryError - 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.