org.globus.ftp
Class HostPort6

java.lang.Object
  extended by org.globus.ftp.HostPort
      extended by org.globus.ftp.HostPort6

public class HostPort6
extends HostPort

Utility class for parsing and converting host-port information from EPSV and EPRT ftp commands.


Field Summary
static java.lang.String IPv4
           
static java.lang.String IPv6
           
 
Constructor Summary
HostPort6(java.lang.String passiveReplyMessage)
          Parses host-port from passive mode reply message.
HostPort6(java.lang.String version, java.lang.String host, int port)
           
 
Method Summary
 java.lang.String getHost()
          Returns the host address
static java.lang.String getIPAddressVersion(java.lang.String address)
           
 int getPort()
          Returns the port number
 java.lang.String getVersion()
          Returns the address version
 void setHost(java.lang.String host)
          Sets the host address
 void setVersion(java.lang.String version)
          Sets the address version
 java.lang.String toFtpCmdArgument()
          Returns the host-port information in the format used by EPRT command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPv4

public static final java.lang.String IPv4
See Also:
Constant Field Values

IPv6

public static final java.lang.String IPv6
See Also:
Constant Field Values
Constructor Detail

HostPort6

public HostPort6(java.lang.String version,
                 java.lang.String host,
                 int port)

HostPort6

public HostPort6(java.lang.String passiveReplyMessage)
Parses host-port from passive mode reply message. Note that the argument is not the whole message, but only the content of the brackets:

Parameters:
passiveReplyMessage - reply message for the EPSV command
Method Detail

getPort

public int getPort()
Returns the port number

Overrides:
getPort in class HostPort
Returns:
port number

setHost

public void setHost(java.lang.String host)
Sets the host address

Parameters:
host - the host address

getHost

public java.lang.String getHost()
Returns the host address

Overrides:
getHost in class HostPort
Returns:
host address

getVersion

public java.lang.String getVersion()
Returns the address version

Returns:
address version

setVersion

public void setVersion(java.lang.String version)
Sets the address version

Parameters:
version - the address version

toFtpCmdArgument

public java.lang.String toFtpCmdArgument()
Returns the host-port information in the format used by EPRT command.

Overrides:
toFtpCmdArgument in class HostPort
Returns:
host-port information in EPRT command representation.

getIPAddressVersion

public static java.lang.String getIPAddressVersion(java.lang.String address)