ftp2me
Class PasvInfo

java.lang.Object
  extended by ftp2me.PasvInfo

public class PasvInfo
extends java.lang.Object

Class to calculate and store information returned by a Pasv ftp command.


Field Summary
 java.lang.String ip
          After instantiation this field contains the ip address to connect to.
 int port
          After instantiation this field contains the port to connect to.
 
Constructor Summary
PasvInfo(java.lang.String dataLink)
          Create an instance of PasvInfo.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

port

public int port
After instantiation this field contains the port to connect to.


ip

public java.lang.String ip
After instantiation this field contains the ip address to connect to.

Constructor Detail

PasvInfo

public PasvInfo(java.lang.String dataLink)
         throws FtpProtocolException
Create an instance of PasvInfo. After successful instantiation the fields port and ip can be read. If the dataLink string is badly formatted, an FtpProtocolException is thrown.

Parameters:
dataLink - The part of the response string after PASV which between the brackets.
Throws:
FtpProtocolException