|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An FTP client class which implements remote peer-to-peer transfer.
Field Summary | |
static int |
DIRECTORY
|
static int |
FILE
|
static int |
GETFILE
|
static int |
GETLIST
|
static int |
LINK
|
static int |
UNKNOWN
|
Method Summary | |
long |
bytesTransf()
Gets the number of bytes read |
void |
cwd(java.lang.String dir)
Change to the specified directory, which may be relative or absolute. |
void |
delete(java.lang.String sDirectory,
java.lang.String sFile)
Request to delete the specified file. |
java.util.Vector |
list()
Request a listing of the current directory. |
void |
openConnection(java.lang.String host,
java.lang.String user,
java.lang.String password)
Open a connection to a remote host that runs an FTP server. |
void |
quit()
Close ftp connection |
void |
readResponse()
Read a response from the host. |
void |
receive(java.lang.String directory,
java.lang.String filename,
FTPVisitor ftpVisitor)
Request that the host allocate a port socket and listen for a data connection from another host on that port. |
java.lang.String |
retResponse()
Returns FTP server response |
void |
send(java.lang.String directory,
java.lang.String filename,
FTPSender ftpSender)
Request that the host allocate a port socket and listen for a data connection from another host on that port. |
void |
sendCommand(java.lang.String command)
Send a command to the host, and read the response. |
void |
setAscii()
Set the transfer mode to Ascii. |
void |
setBinary()
Set the transfer mode to Image (also referred to as "binary"). |
Field Detail |
public static final int UNKNOWN
public static final int DIRECTORY
public static final int FILE
public static final int LINK
public static final int GETLIST
public static final int GETFILE
Method Detail |
public void openConnection(java.lang.String host, java.lang.String user, java.lang.String password) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void sendCommand(java.lang.String command) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void readResponse() throws java.io.IOException
java.io.IOException
public void setAscii() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void setBinary() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void cwd(java.lang.String dir) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public java.util.Vector list() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void delete(java.lang.String sDirectory, java.lang.String sFile) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void send(java.lang.String directory, java.lang.String filename, FTPSender ftpSender) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void receive(java.lang.String directory, java.lang.String filename, FTPVisitor ftpVisitor) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public void quit() throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public long bytesTransf()
public java.lang.String retResponse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |