Module jcifs

Interface Address

All Known Subinterfaces:
NetbiosAddress
All Known Implementing Classes:
NbtAddress, UniAddress

public interface Address
Interface for both netbios and internet addresses
Author:
mbechler
  • Method Details

    • unwrap

      <T extends Address> T unwrap(Class<T> type)
      Unwrap the address to a specific type
      Type Parameters:
      T - the type to unwrap to
      Parameters:
      type - the target type to unwrap to
      Returns:
      instance for type, null if the type cannot be unwrapped
    • getHostName

      String getHostName()
      Gets the host name of this address.
      Returns:
      the resolved host name, or the host address if it could not be resolved
    • getHostAddress

      String getHostAddress()
      Return the IP address as text such as "192.168.1.15".
      Returns:
      the ip address
    • toInetAddress

      InetAddress toInetAddress() throws UnknownHostException
      Converts this address to an InetAddress.
      Returns:
      this address as an InetAddress
      Throws:
      UnknownHostException - if the host cannot be resolved
    • firstCalledName

      String firstCalledName()
      Guess called name to try for session establishment. These methods are used by the smb package.
      Returns:
      guessed name
    • nextCalledName

      String nextCalledName(CIFSContext tc)
      Guess next called name to try for session establishment. These methods are used by the smb package.
      Parameters:
      tc - the transport context to use for name resolution
      Returns:
      guessed name