diff options
author | Danny van Bruggen <hexagonaal@gmail.com> | 2017-09-04 20:18:53 +0200 |
---|---|---|
committer | Danny van Bruggen <hexagonaal@gmail.com> | 2017-09-04 20:18:53 +0200 |
commit | 99534da686e9c8e416dcaccea3853e5504ddf5bf (patch) | |
tree | 89b9d022c8573a28d3661f06ccd873727b0e9985 /javaparser-testing | |
parent | 4227ff2cf09329f1ba6078db8329078b54fd703f (diff) | |
download | javaparser-99534da686e9c8e416dcaccea3853e5504ddf5bf.tar.gz |
Remove some experimental stuff
Diffstat (limited to 'javaparser-testing')
-rw-r--r-- | javaparser-testing/src/test/java/com/github/javaparser/utils/TestUtils.java | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/javaparser-testing/src/test/java/com/github/javaparser/utils/TestUtils.java b/javaparser-testing/src/test/java/com/github/javaparser/utils/TestUtils.java index fd5e593f6..95227527a 100644 --- a/javaparser-testing/src/test/java/com/github/javaparser/utils/TestUtils.java +++ b/javaparser-testing/src/test/java/com/github/javaparser/utils/TestUtils.java @@ -102,36 +102,6 @@ public class TestUtils { Files.write(destination, response.body().bytes()); } - public static void downloadFtp(String server, String path, String user, String pass, OutputStream outputStream) throws IOException { - FTPClient ftp = new FTPClient(); - try { - ftp.connect(server); - System.out.println("Connected to " + server + "."); - System.out.print(ftp.getReplyString()); - - if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) { - throw new RuntimeException("FTP server refused connection."); - } - - ftp.user(user); - if (!FTPReply.isPositiveCompletion(ftp.pass(pass))) { - throw new RuntimeException("Password not accepted"); - } - Log.info("Authenticated."); - ftp.enterLocalPassiveMode(); - Log.info("Downloading..."); - if (!ftp.retrieveFile(path, outputStream)) { - throw new RuntimeException("Couldn't download " + path); - } - Log.info("Logging out."); - ftp.logout(); - } finally { - if (ftp.isConnected()) { - ftp.disconnect(); - } - } - } - public static String temporaryDirectory() { return System.getProperty("java.io.tmpdir"); } |