Module jcifs

Class Name

java.lang.Object
org.codelibs.jcifs.smb.netbios.Name
All Implemented Interfaces:
NetbiosName

public class Name extends Object implements NetbiosName
NetBIOS name implementation. This class represents NetBIOS names used in SMB networking.
  • Field Details

    • name

      public String name
      Name
    • scope

      public String scope
      Scope id
    • hexCode

      public int hexCode
      Type
  • Constructor Details

    • Name

      public Name(Configuration cfg, String name, int hexCode, String scope)
      Constructs a NetBIOS name with the specified parameters.
      Parameters:
      cfg - the configuration to use
      name - the NetBIOS name (will be truncated to 15 characters if longer)
      hexCode - the NetBIOS name type code
      scope - the NetBIOS scope identifier
    • Name

      public Name(Configuration cfg, NetbiosName name)
      Constructs a Name from a NetbiosName.
      Parameters:
      cfg - the configuration to use
      name - the NetbiosName to copy from
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NetbiosName
      Returns the NetBIOS name.
      Specified by:
      getName in interface NetbiosName
      Returns:
      the name
    • getScope

      public String getScope()
      Description copied from interface: NetbiosName
      Returns the NetBIOS scope identifier.
      Specified by:
      getScope in interface NetbiosName
      Returns:
      scope id
    • getNameType

      public int getNameType()
      Description copied from interface: NetbiosName
      Returns the NetBIOS name type.
      Specified by:
      getNameType in interface NetbiosName
      Returns:
      the name type
    • isUnknown

      public boolean isUnknown()
      Checks if this represents an unknown address.
      Returns:
      whether this is the unknown address
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object