public void load ( File authorizationFile ) throws AuthorizationFileException { FileInputStream fis = null ; try { fis = new FileInputStream ( authorizationFile ) ; ANTLRInputStream stream = new ANTLRInputStream ( fis ) ; SAFPLexer lexer = new SAFPLexer ( stream ) ; CommonTokenStream tokens = new CommonTokenStream ( lexer ) ; SAFPParser parser = new SAFPParser ( tokens ) ; parser . prog ( ) ; setAccessRules ( parser . getAccessRules ( ) ) ; setGroups ( parser . getGroups ( ) ) ; setAliases ( parser . getAliases ( ) ) ; } catch ( FileNotFoundException e ) { throw new AuthorizationFileException ( "FileNotFoundException: " , e ) ; } catch ( IOException e ) { throw new AuthorizationFileException ( "IOException: " , e ) ; } catch ( RecognitionException e ) { throw new AuthorizationFileException ( "Parser problem: " , e ) ; } finally { try { fis . close ( ) ; } catch ( IOException e ) { throw new AuthorizationFileException ( "IOExcetion during close: " , e ) ; } } }
Load the authorization file .