code: public static String readAllBytesAsString(final InputStream inputStream, final long fileSize)
              throws IOException {
          final SimpleEntry<byte[], Integer> ent = readAllBytes(inputStream, fileSize);
          final byte[] buf = ent.getKey();
          final int bufBytesUsed = ent.getValue();
          return new String(buf, 0, bufBytesUsed, StandardCharsets.UTF_8);
      }
docs: Read all the bytes in an {@link InputStream} as a String.
  
  @param inputStream
  The {@link InputStream}.
  @param fileSize
  The file size, if known, otherwise -1L.
  @return The contents of the {@link InputStream} as a String.
  @throws IOException
  If the contents could not be read.