synchronized static NbtAddress getByName( Name name ) { NbtAddress result = null; try { if( FILENAME != null ) { File f = new File( FILENAME ); long lm; if(( lm = f.lastModified() ) > lastModified ) { lastModified = lm; TAB.clear(); alt = 0; populate( new FileReader( f )); } result = (NbtAddress)TAB.get( name ); } } catch( FileNotFoundException fnfe ) { if( log.level > 1 ) { log.println( "lmhosts file: " + FILENAME ); fnfe.printStackTrace( log ); } } catch( IOException ioe ) { if( log.level > 0 ) ioe.printStackTrace( log ); } return result; }
synchronized static NbtAddress getByName( Name name ) { NbtAddress result = null; try { if( FILENAME != null ) { File f = new File( FILENAME ); long lm; if(( lm = f.lastModified() ) > lastModified ) { lastModified = lm; TAB.clear(); alt = 0; populate( new FileReader( f )); } result = (NbtAddress)TAB.get( name ); } } catch( FileNotFoundException fnfe ) { if( log.level > 1 ) { log.println( "lmhosts file: " + FILENAME ); fnfe.printStackTrace( log ); } } catch( IOException ioe ) { if( log.level > 0 ) ioe.printStackTrace( log ); } return result; }
synchronized static NbtAddress getByName( Name name ) { NbtAddress result = null; try { if( FILENAME != null ) { File f = new File( FILENAME ); long lm; if(( lm = f.lastModified() ) > lastModified ) { lastModified = lm; TAB.clear(); alt = 0; populate( new FileReader( f )); } result = (NbtAddress)TAB.get( name ); } } catch( FileNotFoundException fnfe ) { if( log.level > 1 ) { log.println( "lmhosts file: " + FILENAME ); fnfe.printStackTrace( log ); } } catch( IOException ioe ) { if( log.level > 0 ) ioe.printStackTrace( log ); } return result; }
synchronized static NbtAddress getByName( Name name ) { NbtAddress result = null; try { if( FILENAME != null ) { File f = new File( FILENAME ); long lm; if(( lm = f.lastModified() ) > lastModified ) { lastModified = lm; TAB.clear(); alt = 0; populate( new FileReader( f )); } result = (NbtAddress)TAB.get( name ); } } catch( FileNotFoundException fnfe ) { if( log.level > 1 ) { log.println( "lmhosts file: " + FILENAME ); fnfe.printStackTrace( log ); } } catch( IOException ioe ) { if( log.level > 0 ) ioe.printStackTrace( log ); } return result; }
synchronized NbtAddress getByName ( Name name, CIFSContext tc ) { NbtAddress result = null; try { if ( tc.getConfig().getLmHostsFileName() != null ) { File f = new File(tc.getConfig().getLmHostsFileName()); long lm; if ( ( lm = f.lastModified() ) > this.lastModified ) { if ( log.isDebugEnabled() ) { log.debug("Reading " + tc.getConfig().getLmHostsFileName()); } this.lastModified = lm; this.table.clear(); try ( FileReader r = new FileReader(f) ) { populate(r, tc); } } result = this.table.get(name); } } catch ( IOException fnfe ) { log.error("Could not read lmhosts " + tc.getConfig().getLmHostsFileName(), fnfe); //$NON-NLS-1$ } return result; }
synchronized NbtAddress getByName ( Name name, CIFSContext tc ) { NbtAddress result = null; try { if ( tc.getConfig().getLmHostsFileName() != null ) { File f = new File(tc.getConfig().getLmHostsFileName()); long lm; if ( ( lm = f.lastModified() ) > this.lastModified ) { if ( log.isDebugEnabled() ) { log.debug("Reading " + tc.getConfig().getLmHostsFileName()); } this.lastModified = lm; this.table.clear(); try ( FileReader r = new FileReader(f) ) { populate(r, tc); } } result = this.table.get(name); } } catch ( IOException fnfe ) { log.error("Could not read lmhosts " + tc.getConfig().getLmHostsFileName(), fnfe); //$NON-NLS-1$ } return result; }