public class HostPort
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int[] |
datainfo |
Modifier | Constructor and Description |
---|---|
protected |
HostPort() |
|
HostPort(java.net.InetAddress addr,
int port)
Creates the HostPort object from specified ip address
and port number.
|
|
HostPort(java.lang.String passiveReplyMessage)
Parses host-port from passive mode reply message.
|
|
HostPort(java.lang.String ipAddress,
int port)
Creates the HostPort object from specified ip address
and port number.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHost()
Returns the ip address in the form "h1.h2.h3.h4"
|
int |
getPort()
Returns the port number
|
java.lang.String |
toFtpCmdArgument()
Returns the host-port information in the
format used by PORT command.
|
protected HostPort()
public HostPort(java.lang.String passiveReplyMessage)
passiveReplyMessage
- reply message for the PASV commandpublic HostPort(java.net.InetAddress addr, int port)
addr
- ip addressport
- port numberpublic HostPort(java.lang.String ipAddress, int port)
ipAddress
- ip addressport
- port numberpublic int getPort()
public java.lang.String getHost()
public java.lang.String toFtpCmdArgument()