public static byte[] readBytesFromStream(InputStream stream, int size) throws IOException {
    return readBytesFromStream(stream, new byte[size], 0, size);
  }
Read "size" length of bytes from stream to a byte array. If "size" length of bytes can't be read because the end of
the stream has been reached, IOException is thrown. This method blocks until input data is available, the end of
the stream is detected, or an exception is thrown.
@param stream from which data to be read from
@param size max length of bytes to be read from the stream.
@return byte[] which has the data that is read from the stream
@throws IOException
ambry-utils/src/main/java/com/github/ambry/utils/Utils.java