docs: public static byte[] toByteArray(InputStream in) throws IOException {
      checkNotNull(in, "in");
      try {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        copy(in, out);
        return out.toByteArray();
      } finally {
        ensureClosed(in);
      }
    }