code: public static ObjectStream<String> readFileIntoMarkableStreamFactory(
        final String infile) {
  
      InputStreamFactory inputStreamFactory = null;
      try {
        inputStreamFactory = new MarkableFileInputStreamFactory(new File(infile));
      } catch (final FileNotFoundException e) {
        e.printStackTrace();
      }
      ObjectStream<String> lineStream = null;
      try {
        lineStream = new PlainTextByLineStream(inputStreamFactory, "UTF-8");
      } catch (final IOException e) {
        CmdLineUtil.handleCreateObjectStreamError(e);
      }
      return lineStream;
    }
docs: Read the file into an {@code ObjectStream}.
  
  @param infile
  the string pointing to the file
  @return the object stream