/** * @param cfg * @param name */ public Name ( Configuration cfg, NetbiosName name ) { this.config = cfg; this.name = name.getName(); this.hexCode = name.getNameType(); this.scope = name.getScope(); if ( name instanceof Name ) { this.srcHashCode = ( (Name) name ).srcHashCode; } }
/** * @param cfg * @param name */ public Name ( Configuration cfg, NetbiosName name ) { this.config = cfg; this.name = name.getName(); this.hexCode = name.getNameType(); this.scope = name.getScope(); if ( name instanceof Name ) { this.srcHashCode = ( (Name) name ).srcHashCode; } }
@Override public NbtAddress[] getNbtAllByAddress ( NetbiosAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = getNodeStatus(addr); cacheAddressArray(addrs); return addrs; } catch ( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString(addr.getNameType(), 2) + ( ( ( addr.getName().getScope() == null ) || ( addr.getName().getScope().isEmpty() ) ) ? " with no scope" : " with scope " + addr.getName().getScope() ) + " for host " + addr.getHostAddress()); } }
@Override public NbtAddress[] getNbtAllByAddress ( NetbiosAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = getNodeStatus(addr); cacheAddressArray(addrs); return addrs; } catch ( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString(addr.getNameType(), 2) + ( ( ( addr.getName().getScope() == null ) || ( addr.getName().getScope().isEmpty() ) ) ? " with no scope" : " with scope " + addr.getName().getScope() ) + " for host " + addr.getHostAddress()); } }