public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(".stg") ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar) { super(delimiterStartChar, delimiterStopChar); if ( !fileName.endsWith(GROUP_FILE_EXTENSION) ) { throw new IllegalArgumentException("Group file names must end in .stg: "+fileName); } //try { File f = new File(fileName); if ( f.exists() ) { try { url = f.toURI().toURL(); } catch (MalformedURLException e) { throw new STException("can't load group file "+fileName, e); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == file "+f.getAbsolutePath()); } else { // try in classpath url = getURL(fileName); if ( url==null ) { throw new IllegalArgumentException("No such group file: "+ fileName); } if ( verbose ) System.out.println("STGroupFile(" + fileName + ") == url "+url); } this.fileName = fileName; }