private static String readerToString(Reader reader) throws IOException {
    reader = new BufferedReader(reader);
    StringBuilder stringBuilder = new StringBuilder();
    int c;
    while ((c = reader.read()) != -1) {
      stringBuilder.append((char) c);
    }
    return stringBuilder.toString();
  }
Reads the contents of a {@link Reader} into a {@link String}.
java_src/src/main/java/com/google/crypto/tink/util/KeysDownloader.java