org.gcube.application.enm.service.conn
Class FtpClient

java.lang.Object
  extended by org.gcube.application.enm.service.conn.FtpClient

public class FtpClient
extends Object

Simple FTP client.

Author:
Erik Torres

Field Summary
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
 
Constructor Summary
FtpClient()
           
 
Method Summary
 boolean changeDirectory(String dirname)
           
 void connect(String server, int port, String username, String password)
           
 void deleteDir(String dirname)
           
 void disconnect()
           
 String[] listFiles(String dirName)
           
 void makeDirectory(String dirname)
           
 InputStream retrieveFileAsInputStream(String filename)
           
 String retrieveFileAsString(String filename)
           
 void uploadFile(String localFilename, String remoteFilename)
           
 void uploadString(String content, String remoteFilename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.gcube.common.core.utils.logging.GCUBELog logger
Constructor Detail

FtpClient

public FtpClient()
Method Detail

connect

public void connect(String server,
                    int port,
                    String username,
                    String password)
             throws IOException
Throws:
IOException

changeDirectory

public boolean changeDirectory(String dirname)
                        throws IOException
Throws:
IOException

listFiles

public String[] listFiles(String dirName)
                   throws IOException
Throws:
IOException

retrieveFileAsInputStream

public InputStream retrieveFileAsInputStream(String filename)
                                      throws IOException
Throws:
IOException

retrieveFileAsString

public String retrieveFileAsString(String filename)
                            throws IOException
Throws:
IOException

makeDirectory

public void makeDirectory(String dirname)
                   throws IOException
Throws:
IOException

uploadFile

public void uploadFile(String localFilename,
                       String remoteFilename)
                throws IOException
Throws:
IOException

uploadString

public void uploadString(String content,
                         String remoteFilename)
                  throws IOException
Throws:
IOException

deleteDir

public void deleteDir(String dirname)
               throws IOException
Throws:
IOException

disconnect

public void disconnect()


Copyright © 2012. All Rights Reserved.