code: public static String readTextFile(InputStream inputStream) {
          InputStreamReader streamReader = new InputStreamReader(inputStream);
          return readTextFile(streamReader);
      }
docs: Read a text stream into a single string.
  
  @param inputStream
  Stream containing text. Will be closed on exit.
  @return The contents, or null on error.