public class NetBIOSName
extends java.lang.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 and Type | Field and Description |
---|---|
static java.lang.String |
AdapterStatusName |
static char |
BrowseMasterGroup |
static java.lang.String |
BrowseMasterName |
static char |
DECPathworksService |
static int |
DefaultTTL |
static char |
Domain |
static char |
DomainAnnounce |
static char |
DomainControllers |
static char |
DomainMasterBrowser |
static char |
FileServer |
static char |
LotusNotesServerService |
static char |
MasterBrowser |
static char |
McCaffeeAntiVirus |
static char |
Messenger |
static char |
ModemSharingClient |
static char |
ModemSharingService |
static char |
MSExchangeDirectory |
static char |
MSExchangeIMC |
static char |
MSExchangeInterchange |
static char |
MSExchangeMTA |
static char |
MSExchangeStore |
static int |
NameLength |
static char |
NetworkMonitorAgent |
static char |
NetworkMonitorApp |
static char |
RASClientService |
static char |
RASServer |
static char |
RemoteMessenger |
static java.lang.String |
SMBServer |
static java.lang.String |
SMBServer2 |
static char |
SMSAdminRemoteControl |
static char |
SMSClientRemoteChat |
static char |
SMSClientRemoteControl |
static char |
SMSClientRemoteTransfer |
static char |
WorkStation |
Modifier | Constructor and Description |
---|---|
|
NetBIOSName(byte[] buf,
int off)
Create a NetBIOS name from a byte array
|
|
NetBIOSName(NetBIOSName nbName)
Copy constructor
|
|
NetBIOSName(java.lang.String name)
Create a NetBIOS name from an encoded name string
|
|
NetBIOSName(java.lang.String name,
char typ,
boolean group)
Create a unique NetBIOS name.
|
|
NetBIOSName(java.lang.String name,
char typ,
boolean group,
byte[] ipaddr)
Create a unique NetBIOS name.
|
|
NetBIOSName(java.lang.String name,
char typ,
boolean group,
byte[] ipaddr,
int ttl)
Create a unique NetBIOS name.
|
|
NetBIOSName(java.lang.String name,
char typ,
boolean group,
java.util.Vector ipList)
Create a unique NetBIOS name.
|
|
NetBIOSName(java.lang.String name,
char typ,
boolean group,
java.util.Vector ipList,
int ttl)
Create a unique NetBIOS name.
|
protected |
NetBIOSName(java.lang.String name,
java.lang.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(java.util.Vector 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(java.lang.Object obj)
Compare objects for equality.
|
int |
findBestMatchAddress(java.net.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.
|
java.lang.String |
getFullName()
Return the full name including any name scope
|
byte[] |
getIPAddress(int idx)
Return the specified IP address that owns the NetBIOS name.
|
java.lang.String |
getIPAddressString(int idx)
Return the specified IP address that owns the NetBIOS name, as a string.
|
java.lang.String |
getName()
Return the NetBIOS name.
|
static java.lang.String |
getNameConversionCharacterSet()
Return the name conversion character set name
|
int |
getNameNumber()
Get the name number/id
|
java.lang.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(java.lang.String name)
Set the NetBIOS name.
|
static void |
setNameConversionCharacterSet(java.lang.String charSet)
Set the name conversion character set
|
void |
setNameNumber(int nameNum)
Set the name number
|
void |
setNameScope(java.lang.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.
|
java.lang.String |
toString()
Return the NetBIOS name as a string.
|
static java.lang.String |
toUpperCaseName(java.lang.String name)
Convert a name to uppercase
|
static java.lang.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 java.lang.String BrowseMasterName
public static final java.lang.String SMBServer
public static final java.lang.String SMBServer2
public static final java.lang.String AdapterStatusName
public static final int DefaultTTL
public NetBIOSName(java.lang.String name, char typ, boolean group)
name
- java.lang.Stringtyp
- chargroup
- public NetBIOSName(NetBIOSName nbName)
nbName
- NetBIOSNamepublic NetBIOSName(java.lang.String name, char typ, boolean group, byte[] ipaddr)
name
- java.lang.Stringtyp
- chargroup
- booleanipaddr
- byte[]public NetBIOSName(java.lang.String name, char typ, boolean group, java.util.Vector ipList)
name
- java.lang.Stringtyp
- chargroup
- booleanipList
- Vectorpublic NetBIOSName(java.lang.String name, char typ, boolean group, byte[] ipaddr, int ttl)
name
- java.lang.Stringtyp
- chargroup
- booleanipaddr
- byte[]ttl
- intpublic NetBIOSName(java.lang.String name, char typ, boolean group, java.util.Vector ipList, int ttl)
name
- java.lang.Stringtyp
- chargroup
- booleanipList
- Vectorttl
- intpublic NetBIOSName(byte[] buf, int off)
buf
- byte[]off
- intpublic NetBIOSName(java.lang.String name)
name
- Stringprotected NetBIOSName(java.lang.String name, java.lang.String scope)
name
- Stringscope
- Stringpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- java.lang.Objectpublic final long getExpiryTime()
public final int getTimeToLive()
public final int getNameNumber()
public final int numberOfAddresses()
public final byte[] getIPAddress(int idx)
idx
- intpublic final java.lang.String getIPAddressString(int idx)
idx
- intpublic final java.lang.String getName()
public final java.lang.String getFullName()
public final byte[] getNetBIOSName()
public final boolean hasNameScope()
public final java.lang.String getNameScope()
public final char getType()
public int hashCode()
hashCode
in class java.lang.Object
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(java.lang.String scope)
scope
- Stringpublic final void addIPAddress(byte[] ipaddr)
ipaddr
- byte[]public final void addIPAddresses(java.util.Vector addrList)
addrList
- Vector (of byte[])public final void setLocalName(boolean local)
local
- booleanpublic final void setName(java.lang.String name)
name
- java.lang.Stringpublic final void setType(char typ)
typ
- charpublic final void setNameNumber(int nameNum)
nameNum
- intpublic static java.lang.String toUpperCaseName(java.lang.String name)
public static final boolean hasNameConversionCharacterSet()
public static final java.lang.String getNameConversionCharacterSet()
public static final void setNameConversionCharacterSet(java.lang.String charSet)
charSet
- Stringpublic java.lang.String toString()
toString
in class java.lang.Object
public byte[] encodeName()
public final int findBestMatchAddress(java.net.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 java.lang.String TypeAsString(char typ)
typ
- charCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.