Package 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.)

Since:
  3.6

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### NatServerResolverImpl

    public NatServerResolverImpl(FTPClient client)
    Constructs a new instance.
    Parameters:
      `client` - the FTP client.

- ## Method Details

  - ### 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.