public synchronized void parseCatalog ( URL aUrl ) throws IOException { catalogCwd = aUrl ; base = aUrl ; default_override = catalogManager . getPreferPublic ( ) ; catalogManager . debug . message ( 4 , "Parse catalog: " + aUrl . toString ( ) ) ; DataInputStream inStream = null ; boolean parsed = false ; for ( int count = 0 ; ! parsed && count < readerArr . size ( ) ; count ++ ) { CatalogReader reader = ( CatalogReader ) readerArr . get ( count ) ; try { inStream = new DataInputStream ( aUrl . openStream ( ) ) ; } catch ( FileNotFoundException fnfe ) { // No catalog; give up! break ; } try { reader . readCatalog ( this , inStream ) ; parsed = true ; } catch ( CatalogException ce ) { if ( ce . getExceptionType ( ) == CatalogException . PARSE_FAILED ) { // give up! break ; } else { // try again! } } try { inStream . close ( ) ; } catch ( IOException e ) { //nop } } if ( parsed ) parsePendingCatalogs ( ) ; }
Parse a catalog document augmenting internal data structures .