/** * This is really just for {@link jcifs.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. */ public synchronized static NbtAddress getByName( String host ) { return getByName( new Name( host, 0x20, null )); }
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; }
/** * This is really just for {@link jcifs.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. */ public synchronized static NbtAddress getByName( String host ) { return getByName( new Name( host, 0x20, null )); }
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; }
/** * This is really just for {@link jcifs.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. */ public synchronized static NbtAddress getByName( String host ) { return getByName( new Name( host, 0x20, null )); }
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; }
/** * This is really just for {@link jcifs.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. */ public synchronized static NbtAddress getByName( String host ) { return getByName( new Name( host, 0x20, null )); }
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; }
/** * This is really just for {@link jcifs.netbios.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. * * @param host * @param tc * @return resolved name, null if not found */ public synchronized NbtAddress getByName ( String host, CIFSContext tc ) { return getByName(new Name(tc.getConfig(), host, 0x20, null), tc); }
/** * This is really just for {@link jcifs.netbios.UniAddress}. It does * not throw an {@link java.net.UnknownHostException} because this * is queried frequently and exceptions would be rather costly to * throw on a regular basis here. * * @param host * @param tc * @return resolved name, null if not found */ public synchronized NbtAddress getByName ( String host, CIFSContext tc ) { return getByName(new Name(tc.getConfig(), host, 0x20, null), tc); }
switch( resolveOrder[i] ) { case RESOLVER_LMHOSTS: NbtAddress ans = Lmhosts.getByName( name ); if( ans != null ) { ans.hostName.srcHashCode = 0; // just has to be different
switch( resolveOrder[i] ) { case RESOLVER_LMHOSTS: NbtAddress ans = Lmhosts.getByName( name ); if( ans != null ) { ans.hostName.srcHashCode = 0; // just has to be different
switch( resolveOrder[i] ) { case RESOLVER_LMHOSTS: NbtAddress ans = Lmhosts.getByName( name ); if( ans != null ) { ans.hostName.srcHashCode = 0; // just has to be different
switch( resolveOrder[i] ) { case RESOLVER_LMHOSTS: NbtAddress ans = Lmhosts.getByName( name ); if( ans != null ) { ans.hostName.srcHashCode = 0; // just has to be different