docs: static byte[] readFile(
        InputStream in, long expectedSize) throws IOException {
      if (expectedSize > Integer.MAX_VALUE) {
        throw new OutOfMemoryError("file is too large to fit in a byte array: "
            + expectedSize + " bytes");
      }
  
      // some special files may return size 0 but have content, so read
      // the file normally in that case
      return expectedSize == 0
          ? ByteStreams.toByteArray(in)
          : ByteStreams.toByteArray(in, (int) expectedSize);
    }