Switch to side-by-side view

--- a/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/utils/SSHManager.java
+++ b/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/utils/SSHManager.java
@@ -72,7 +72,6 @@
         File file = null;
         try {
             file = File.createTempFile("tavernaExtractor-", ".input");
-            //file.deleteOnExit();
         } catch (IOException e) {
             e.printStackTrace();
             throw new SSHManagerException(e.getLocalizedMessage());
@@ -85,8 +84,9 @@
             throw new SSHManagerException(e.getLocalizedMessage());
         }
 
-        session.disconnect();
-        return file;
+       sftpChannel.disconnect();
+       session.disconnect();
+       return file;
     }
 
     public void sendFile(Session session, String from, String to) throws SSHManagerException{
@@ -121,22 +121,4 @@
 
         session.disconnect();
     }
-
-    public static void main(String[] arg) throws Exception{
-
-         SSHManager ssh = new SSHManager("172.16.1.3",22, "timbus", "timbus");
-         Session session = ssh.createSession(60000);
-
-         // downloading file
-         File file = ssh.readFile(session, "/home/timbus/WorkflowInput/+Z150709801_ground_truth.csv");
-         if(file!=null){
-            System.out.println("File successfully saved at "+file.getAbsolutePath() + " [size="+file.length()+"]");
-         }
-
-        Thread.sleep(3000);
-
-         // receiving file
-         ssh.sendFile(session, new File("C:\\Users\\munterberger\\AppData\\Local\\Temp\\tavernaExtractor-7820989094280082735.input").getAbsolutePath(), "/home/timbus/WorkflowInput/tmp.csv");
-    }
-
-}
+  }