org.apache.commons.net.ftp

## Class FTPClient.NatServerResolverImpl

- java.lang.Object
- - org.apache.commons.net.ftp.FTPClient.NatServerResolverImpl

- All Implemented Interfaces:
    FTPClient.HostnameResolver
  Enclosing class:
    FTPClient

      public static class FTPClient.NatServerResolverImpl
      extends Object
      implements FTPClient.HostnameResolver

  Default strategy for passive NAT workaround (site-local replies are replaced.)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NatServerResolverImpl(FTPClient client)` Constructs a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `resolve(String hostname)` Resolves a host name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NatServerResolverImpl

          public NatServerResolverImpl(FTPClient client)

      Constructs a new instance.
      Parameters:
        `client` - the FTP client.

  - ### Method Detail

    - #### resolve

          public String resolve(String hostname)
                         throws UnknownHostException

      Description copied from interface: `FTPClient.HostnameResolver`
      Resolves a host name.
      Specified by:
        `resolve` in interface `FTPClient.HostnameResolver`
      Parameters:
        `hostname` - the hostname to resolve.
      Returns:
        The resolved hostname.
      Throws:
        `UnknownHostException` - if the host is unknown.