Package org.globus.ftp
Class HostPortList
java.lang.Object
org.globus.ftp.HostPortList
Utility class for parsing
and converting host-port information from SPAS
and SPOR FTP commands. Represents a list of host-port pairs.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty listHostPortList
(String spasReplyMsg) Parses host-port from the reply to SPAS command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an element to the listget
(int index) static HostPortList
parseIPv4Format
(String message) static HostPortList
parseIPv6Format
(String message) int
size()
Returns the host-port infromation in the format used by SPOR command.
-
Constructor Details
-
HostPortList
Parses host-port from the reply to SPAS command.- Parameters:
spasReplyMsg
- reply message for the SPAS command
-
HostPortList
public HostPortList()Creates an empty list
-
-
Method Details
-
add
Adds an element to the list -
size
public int size()- Returns:
- number of elements in the list
-
get
- Returns:
- element of the specified index
-
toFtpCmdArgument
Returns the host-port infromation in the format used by SPOR command.- Returns:
- host-port information in SPOR command parameter representation.
-
parseIPv6Format
-
parseIPv4Format
-