Package org.globus.ftp

# Class HostPort6

java.lang.Object
org.globus.ftp.HostPort
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

Fields
Modifier and Type
Field
Description
`static final String`
`IPv4`
`static final String`
`IPv6`

## Constructor Summary

Constructors
Constructor
Description
`HostPort6(String passiveReplyMessage)`
Parses host-port from passive mode reply message.
`HostPort6(String version, String host, int port)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getHost()`
Returns the host address
`static String`
`getIPAddressVersion(String address)`
`int`
`getPort()`
Returns the port number
`String`
`getVersion()`
Returns the address version
`void`
`setHost(String host)`
Sets the host address
`void`
`setVersion(String version)`
Sets the address version
`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 Details

### IPv4

public static final String IPv4

See Also:
  - Constant Field Values

### IPv6

public static final String IPv6

See Also:
  - Constant Field Values

## Constructor Details

### HostPort6

public HostPort6(String version, String host, int port)

### HostPort6

public HostPort6(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: <d><net-prt><d><net-addr><d><tcp-port><d>

Parameters:
  `passiveReplyMessage` - reply message for the EPSV command

## Method Details

### getPort

public int getPort()
Returns the port number

Overrides:
  `getPort` in class `HostPort`
Returns:
  port number

### setHost

public void setHost(String host)
Sets the host address

Parameters:
  `host` - the host address

### getHost

public String getHost()
Returns the host address

Overrides:
  `getHost` in class `HostPort`
Returns:
  host address

### getVersion

public String getVersion()
Returns the address version

Returns:
  address version

### setVersion

public void setVersion(String version)
Sets the address version

Parameters:
  `version` - the address version

### toFtpCmdArgument

public String toFtpCmdArgument()
Returns the host-port information in the format used by EPRT command. <d><net-prt><d><net-addr><d><tcp-port><d>

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

### getIPAddressVersion

public static String getIPAddressVersion(String address)