docs: @JSFunction
      public Object readLines()
          throws IOException
      {
          List<String> list = new ArrayList<String>();
          String s;
          while ((s = readLine()) != null) {
              list.add(s);
          }
          String[] lines = list.toArray(new String[list.size()]);
          Scriptable scope = ScriptableObject.getTopLevelScope(this);
          Context cx = Context.getCurrentContext();
          return cx.newObject(scope, "Array", lines);
      }