public class NetBIOSName extends Object
Contains the details of a NetBIOS name, which is a 16 byte value containing the name in the first 15 bytes with a 16th byte indicating the name type.
Contains NetBIOS name type constants.
Modifier | Constructor and Description |
---|---|
|
NetBIOSName(byte[] buf,
int off)
Create a NetBIOS name from a byte array
|
|
NetBIOSName(NetBIOSName nbName)
Copy constructor
|
|
NetBIOSName(String name)
Create a NetBIOS name from an encoded name string
|
|
NetBIOSName(String name,
char typ,
boolean group)
Create a unique NetBIOS name.
|
|
NetBIOSName(String name,
char typ,
boolean group,
byte[] ipaddr)
Create a unique NetBIOS name.
|
|
NetBIOSName(String name,
char typ,
boolean group,
byte[] ipaddr,
int ttl)
Create a unique NetBIOS name.
|
|
NetBIOSName(String name,
char typ,
boolean group,
Vector<byte[]> ipList)
Create a unique NetBIOS name.
|
|
NetBIOSName(String name,
char typ,
boolean group,
Vector<byte[]> ipList,
int ttl)
Create a unique NetBIOS name.
|
protected |
NetBIOSName(String name,
String scope)
Create a NetBIOS name from the specified name and scope
|
Modifier and Type | Method and Description |
---|---|
void |
addIPAddress(byte[] ipaddr)
Add an IP address to the list of addresses for this NetBIOS name
|
void |
addIPAddresses(Vector<byte[]> addrList)
Add a list of IP addresses to the list of addresses for this NetBIOS name
|
static NetBIOSName |
decodeNetBIOSName(byte[] buf,
int off)
Decode a NetBIOS name string and create a new NetBIOSName object
|
static int |
decodeNetBIOSNameLength(byte[] buf,
int off)
Decode a NetBIOS name string length
|
byte[] |
encodeName()
Convert a the NetBIOS name into RFC NetBIOS format.
|
boolean |
equals(Object obj)
Compare objects for equality.
|
int |
findBestMatchAddress(InetAddress[] addrList)
Find the best match address that the NetBIOS name is registered on that matches one of the
local TCP/IP addresses
|
long |
getExpiryTime()
Return the system time that the NetBIOS name expires.
|
String |
getFullName()
Return the full name including any name scope
|
byte[] |
getIPAddress(int idx)
Return the specified IP address that owns the NetBIOS name.
|
String |
getIPAddressString(int idx)
Return the specified IP address that owns the NetBIOS name, as a string.
|
String |
getName()
Return the NetBIOS name.
|
static String |
getNameConversionCharacterSet()
Return the name conversion character set name
|
int |
getNameNumber()
Get the name number/id
|
String |
getNameScope()
Return the name scope
|
byte[] |
getNetBIOSName()
Return the NetBIOS name as a 16 character string with the name and type
|
int |
getTimeToLive()
Get the names time to live value, in seconds
|
char |
getType()
Return the NetBIOS name type.
|
int |
hashCode()
Return a hash code for this object.
|
static boolean |
hasNameConversionCharacterSet()
Determine if the name conversion character set has been configured
|
boolean |
hasNameScope()
Determine if the name has a name scope
|
boolean |
isGroupName()
Returns true if this is a group type NetBIOS name.
|
boolean |
isLocalName()
Determine if this is a local or remote NetBIOS name.
|
boolean |
isUniqueName()
Returns true if the NetBIOS name is a unique type name.
|
int |
numberOfAddresses()
Return the number of addresses for this NetBIOS name
|
void |
removeAllAddresses()
Remove all TCP/IP addresses from the NetBIOS name
|
void |
setExpiryTime(long expires)
Set the system time that this NetBIOS name expires at.
|
void |
setGroup(boolean flag)
Set/clear the group name flag.
|
void |
setLocalName(boolean local)
Set the local/remote NetBIOS name flag.
|
void |
setName(String name)
Set the NetBIOS name.
|
static void |
setNameConversionCharacterSet(String charSet)
Set the name conversion character set
|
void |
setNameNumber(int nameNum)
Set the name number
|
void |
setNameScope(String scope)
Set the name scope
|
void |
setTimeToLive(int ttl)
Set the names time to live, in seconds
|
void |
setType(char typ)
Set the NetBIOS name type.
|
String |
toString()
Return the NetBIOS name as a string.
|
static String |
toUpperCaseName(String name)
Convert a name to uppercase
|
static String |
TypeAsString(char typ)
Return the NetBIOS name type as a string.
|
public static final int NameLength
public static final char WorkStation
public static final char Messenger
public static final char RemoteMessenger
public static final char RASServer
public static final char FileServer
public static final char RASClientService
public static final char MSExchangeInterchange
public static final char MSExchangeStore
public static final char MSExchangeDirectory
public static final char LotusNotesServerService
public static final char ModemSharingService
public static final char ModemSharingClient
public static final char McCaffeeAntiVirus
public static final char SMSClientRemoteControl
public static final char SMSAdminRemoteControl
public static final char SMSClientRemoteChat
public static final char SMSClientRemoteTransfer
public static final char DECPathworksService
public static final char MSExchangeIMC
public static final char MSExchangeMTA
public static final char NetworkMonitorAgent
public static final char NetworkMonitorApp
public static final char Domain
public static final char DomainMasterBrowser
public static final char DomainControllers
public static final char MasterBrowser
public static final char DomainAnnounce
public static final char BrowseMasterGroup
public static final String BrowseMasterName
public static final String SMBServer
public static final String SMBServer2
public static final String AdapterStatusName
public static final int DefaultTTL
public NetBIOSName(String name, char typ, boolean group)
name
- java.lang.Stringtyp
- chargroup
- booleanpublic NetBIOSName(NetBIOSName nbName)
nbName
- NetBIOSNamepublic NetBIOSName(String name, char typ, boolean group, byte[] ipaddr)
name
- java.lang.Stringtyp
- chargroup
- booleanipaddr
- byte[]public NetBIOSName(String name, char typ, boolean group, Vector<byte[]> ipList)
name
- java.lang.Stringtyp
- chargroup
- booleanipList
- Vectorpublic NetBIOSName(String name, char typ, boolean group, byte[] ipaddr, int ttl)
name
- java.lang.Stringtyp
- chargroup
- booleanipaddr
- byte[]ttl
- intpublic NetBIOSName(String name, char typ, boolean group, Vector<byte[]> ipList, int ttl)
name
- java.lang.Stringtyp
- chargroup
- booleanipList
- Vectorttl
- intpublic NetBIOSName(byte[] buf, int off)
buf
- byte[]off
- intpublic NetBIOSName(String name)
name
- Stringpublic boolean equals(Object obj)
public final long getExpiryTime()
public final int getTimeToLive()
public final int getNameNumber()
public final int numberOfAddresses()
public final byte[] getIPAddress(int idx)
idx
- intpublic final String getIPAddressString(int idx)
idx
- intpublic final String getName()
public final String getFullName()
public final byte[] getNetBIOSName()
public final boolean hasNameScope()
public final String getNameScope()
public final char getType()
public int hashCode()
public final boolean isGroupName()
public final boolean isLocalName()
public final boolean isUniqueName()
public final void removeAllAddresses()
public final void setExpiryTime(long expires)
expires
- longpublic final void setTimeToLive(int ttl)
ttl
- intpublic final void setGroup(boolean flag)
flag
- booleanpublic final void setNameScope(String scope)
scope
- Stringpublic final void addIPAddress(byte[] ipaddr)
ipaddr
- byte[]public final void addIPAddresses(Vector<byte[]> addrList)
addrList
- Vector (of byte[])public final void setLocalName(boolean local)
local
- booleanpublic final void setName(String name)
name
- java.lang.Stringpublic final void setType(char typ)
typ
- charpublic final void setNameNumber(int nameNum)
nameNum
- intpublic static String toUpperCaseName(String name)
public static final boolean hasNameConversionCharacterSet()
public static final String getNameConversionCharacterSet()
public static final void setNameConversionCharacterSet(String charSet)
charSet
- Stringpublic String toString()
public byte[] encodeName()
public final int findBestMatchAddress(InetAddress[] addrList)
addrList
- InetAddress[]public static NetBIOSName decodeNetBIOSName(byte[] buf, int off)
buf
- byte[]off
- intpublic static int decodeNetBIOSNameLength(byte[] buf, int off)
buf
- byte[]off
- intpublic static final String TypeAsString(char typ)
typ
- charCopyright © 2005–2018 Alfresco Software. All rights reserved.