public class FTPValidator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SETTINGSFILEPATH |
Constructor and Description |
---|
FTPValidator() |
FTPValidator(String ftphost,
int port,
String user,
String passwd)
Constructor for the
FTPValidator that takes the given arguments,
and updates the FTP-settings accordingly. |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
boolean |
onServer(String nameOfUploadedFile) |
boolean |
test501MFile() |
boolean |
testConfigSettings()
Initially verify that communication with the ftp-server succeeds
without using the RemoteFile.
|
boolean |
testDelete()
Check that the delete method can delete a file on the ftp server
|
boolean |
testUploadAndRetrieve()
(1) Test, if uploaded and retrieved file are equal
(2) test that rf.getSize() reports the correct value;
|
boolean |
testWrongChecksumThrowsError() |
public static final String SETTINGSFILEPATH
public FTPValidator(String ftphost, int port, String user, String passwd) throws IOException
FTPValidator
that takes the given arguments,
and updates the FTP-settings accordingly.ftphost
- a given ftp-serverport
- a given ftp-port numberuser
- a given ftp userpasswd
- a given ftp passwordException
- if not able to reset the temporary directory used by the tool.IOException
public FTPValidator()
public boolean testConfigSettings() throws IOException
IOException
public boolean testUploadAndRetrieve() throws IOException
IOException
public boolean testDelete() throws FileNotFoundException
FileNotFoundException
public boolean test501MFile() throws Exception
Exception
public boolean testWrongChecksumThrowsError() throws Exception
Exception
public boolean onServer(String nameOfUploadedFile) throws IOException
IOException
Copyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.