int p; if ((p=assetFilename.lastIndexOf(File.separatorChar))!=-1) { targetdir = new File(assetFilename.substring(0,p)); }
  protected void processFile(String assetFilename) {    InputStream stream = null;    try {      targetdir = new File(System.getProperty("user.dir"));      if (assetFilename.equals("-")) {        debug("Reading from standard input.");        stream = new java.io.DataInputStream(System.in);      } else {        debug("Reading \""+assetFilename+"\".");        stream = new FileInputStream(assetFilename);        int p;        if ((p=assetFilename.lastIndexOf(File.separatorChar))!=-1) {          targetdir = new File(assetFilename.substring(0,p));        }      }      /*      if (assetFilename.indexOf('/') == -1) {      } else {        debug("Using ClassLoader to read \""+assetFilename+"\".");        stream =           getClass().getClassLoader().getResourceAsStream(assetFilename);      }      */            Session p = new Session(stream);      session = p;      p.parse();      p.write();      //p.writeBeanInfo();      p.writeFactory("AssetFactory.java");      p.done();      stream.close();    } catch (Exception e) {      System.err.println("Caught: "+e);      e.printStackTrace();    }  }