org.gcube.application.enm.service.conn
Class FtpClient
java.lang.Object
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
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.gcube.common.core.utils.logging.GCUBELog logger
FtpClient
public FtpClient()
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.