docs: private void processReader(Script s, BufferedReader reader, PrintWriter pw) throws IOException {
          String line;
          String lineCountName = "count";
          s.setProperty(lineCountName, BigInteger.ZERO);
          String autoSplitName = "split";
          s.setProperty("out", pw);
  
          try {
              InvokerHelper.invokeMethod(s, "begin", null);
          } catch (MissingMethodException mme) {
              // ignore the missing method exception
              // as it means no begin() method is present
          }
  
          while ((line = reader.readLine()) != null) {
              s.setProperty("line", line);
              s.setProperty(lineCountName, ((BigInteger)s.getProperty(lineCountName)).add(BigInteger.ONE));
  
              if(autoSplit) {
                  s.setProperty(autoSplitName, line.split(splitPattern));
              }
  
              Object o = s.run();
  
              if (autoOutput && o != null) {
                  pw.println(o);
              }
          }
  
          try {
              InvokerHelper.invokeMethod(s, "end", null);
          } catch (MissingMethodException mme) {
              // ignore the missing method exception
              // as it means no end() method is present
          }
      }