code: public static byte[] read(InputStream pInput) throws IOException {
          // Create byte array
          ByteArrayOutputStream bytes = new FastByteArrayOutputStream(BUF_SIZE);
  
          // Copy from stream to byte array
          copy(pInput, bytes);
  
          return bytes.toByteArray();
      }
docs: Reads all data from the input stream to a byte array.
  
  @param pInput The input stream to read from
  @return The content of the stream as a byte array.
  @throws IOException if an i/o error occurs during read.