|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.io.FTPClient
public class FTPClient
This class implements a 'directory listener' to listen for new files and
ftp them to a remote FTP server. <
This class uses the implementation found on the web for an FTP client.
Constructor Summary | |
---|---|
FTPClient(java.lang.String aHost,
java.lang.String aUser,
java.lang.String aPassword)
Constructor that takes the three parameters necessary for the FTP connection. |
Method Summary | |
---|---|
void |
sendBinaryFile(java.lang.String aFilename)
This method sends a binary file to the default FTP location on the server. |
void |
sendFiles(java.lang.String[] aFilenames,
boolean aBinaryMode)
This method sends a group of files to the default FTP location on the server. |
void |
sendFiles(java.lang.String[] aFilenames,
boolean[] aBinaryMode)
This method sends a group of files to the default FTP location on the server. |
void |
sendTextFile(java.lang.String aFilename)
This method sends a text file to the default FTP location on the server. |
void |
testFTPConnection()
This method can be used to test the connection with the FTP server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTPClient(java.lang.String aHost, java.lang.String aUser, java.lang.String aPassword)
aHost
- String with the hostname of the FTP server to connect to.aUser
- String with the username to connect with.aPassword
- String with the password for the specified user.Method Detail |
---|
public void sendTextFile(java.lang.String aFilename) throws java.io.IOException
aFilename
- String with the filename to send.
java.io.IOException
- when retrieving the file fails, or sending the file
failed.public void sendBinaryFile(java.lang.String aFilename) throws java.io.IOException
aFilename
- String with the filename to send.
java.io.IOException
- when retrieving the file fails, or sending the file
failed.public void sendFiles(java.lang.String[] aFilenames, boolean[] aBinaryMode) throws java.io.IOException
aFilenames
- String[] with the filenames of the files to send.aBinaryMode
- boolean[] to indicate whether the files are to be send in binary
transfer mode ('true') or text mode ('false'). Note that this
setting applies to all files in the group.
java.io.IOException
- when retrieving the file fails, or sending the file
failed.public void sendFiles(java.lang.String[] aFilenames, boolean aBinaryMode) throws java.io.IOException
aFilenames
- String[] with the filenames of the files to send.aBinaryMode
- boolean to indicate whether the files are to be send in binary
transfer mode ('true') or text mode ('false'). Note that this
setting applies to all files in the group.
java.io.IOException
- when retrieving the file fails, or sending the file
failed.public void testFTPConnection() throws java.io.IOException
java.io.IOException
- whenever a connection could not be established.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |