|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.backsource.adaptor.ftp.NetFTPConnection
An FTP Connection based on the jakarta commont-net-ftp lib.
It is important to know that a close() on the connections just returns the connection to the factory; and do not close the real connection.
| Constructor Summary | |
protected |
NetFTPConnection(FTPConnectionFactory factory)
|
| Method Summary | |
void |
cd(java.lang.String dir)
Change dir. |
void |
close()
Close the connection, effectively leaving it back to the factory. |
protected void |
connect()
|
void |
deleteFile(java.lang.String url)
Delete specifyed file, pathname may contains directory path. |
java.io.InputStream |
get(java.lang.String url)
Get the specifyed file from the server. |
java.lang.String |
getWorkingDirectory()
Get the name of the working directory. |
protected void |
internalClose()
|
boolean |
isAlive()
Check if connection is alive. |
java.util.List |
list(java.lang.String url)
List files in dir url or if single file list that file, to list files in the current directory use a . |
void |
mkdir(java.lang.String url)
Create a directory specifyed by pathname. |
void |
put(java.lang.String url,
java.io.InputStream localStream)
Put stream on server in file named by url, the url may denote a file with a directory path. |
void |
setBinaryMode(boolean binaryMode)
Set mode of connection, false means ascii mode. |
void |
setPassiveMode(boolean passiveMode)
Set passive mode. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected NetFTPConnection(FTPConnectionFactory factory)
| Method Detail |
protected void connect()
throws FTPException
FTPExceptionprotected void internalClose()
public void close()
FTPConnection
close in interface FTPConnection
public void setBinaryMode(boolean binaryMode)
throws FTPException
FTPConnection
setBinaryMode in interface FTPConnectionFTPException
public void setPassiveMode(boolean passiveMode)
throws FTPException
FTPConnection
setPassiveMode in interface FTPConnectionFTPExceptionpublic boolean isAlive()
FTPConnectionThis will also work as a ping, and may thefore be called from a ping thtread to keep the connection alive.
isAlive in interface FTPConnection
public java.util.List list(java.lang.String url)
throws FTPException
FTPConnection
list in interface FTPConnectionFTPFiles.
FTPException
public java.io.InputStream get(java.lang.String url)
throws FTPException
FTPConnectionThe input will be cached locally, and it is the callers responisbility to close the stream when used.
get in interface FTPConnectionFTPException
public void put(java.lang.String url,
java.io.InputStream localStream)
throws FTPException
FTPConnectionIt is the resonibility of the caller to close the stream when the method return.
put in interface FTPConnectionFTPException
public void deleteFile(java.lang.String url)
throws FTPException
FTPConnection
deleteFile in interface FTPConnectionFTPException
public void mkdir(java.lang.String url)
throws FTPException
FTPConnection
mkdir in interface FTPConnectionFTPException
public java.lang.String getWorkingDirectory()
throws FTPException
FTPConnection
getWorkingDirectory in interface FTPConnectionFTPException
public void cd(java.lang.String dir)
throws FTPException
FTPConnection
cd in interface FTPConnectionFTPException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||