code: public static BufferedReader readReaderFromString(String textFileOrUrl,
        String encoding) throws IOException {
      InputStream is = getInputStreamFromURLOrClasspathOrFileSystem(textFileOrUrl);
      return new BufferedReader(new InputStreamReader(is, encoding));
    }
docs: Open a BufferedReader to a file or URL specified by a String name. If the
  String starts with https?://, then it is interpreted as a URL, otherwise it
  is interpreted as a local file. If the String ends in .gz, it is
  interpreted as a gzipped file (and uncompressed), else it is interpreted as
  a regular text file in the given encoding.
  
  @param textFileOrUrl
  What to read from
  @param encoding
  CharSet encoding
  @return The BufferedReader
  @throws IOException
  If there is an I/O problem