| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BasicConnection
Interface for all connection types
| Method Summary | |
|---|---|
|  void | addConnectionListener(ConnectionListener listener)Add a ConnectionListener to be notified about progress and events. | 
|  boolean | cdup()Go up one directory if possible. | 
|  boolean | chdir(java.lang.String p)Change dircetory and inform listeners. | 
|  boolean | chdirNoRefresh(java.lang.String p)Change directory, but do not trigger an event for the listeners. | 
|  void | disconnect()Teminates the connection if necessary. | 
|  int | download(java.lang.String file)Initiate a download in the same thread. | 
|  java.io.InputStream | getDownloadInputStream(java.lang.String file)Initiate a download and return the content in form of an InputStream. | 
|  java.lang.String | getLocalPath()Get the path downloaded to. | 
|  int[] | getPermissions()Get file/dir permissions. | 
|  java.lang.String | getPWD()Get the current working dir. | 
|  int | handleDownload(java.lang.String file)Initiate a download, possibly non-blocking and in a new thread. | 
|  int | handleUpload(java.lang.String file)Initiate an upload, possibly non-blocking and in a new thread. | 
|  boolean | isConnected()Shows if the Connection is alive and initialized. | 
|  void | list()Perform any necessary actions so sortLs, sortSize and sortDates are up-to-date. | 
|  boolean | mkdir(java.lang.String dirName)Create a new directory. | 
|  int | removeFileOrDir(java.lang.String file)Remove the given item, recursively if necessary. | 
|  boolean | rename(java.lang.String from,
       java.lang.String to)Rename a file or directory. | 
|  void | sendRawCommand(java.lang.String cmd)Some Connections like FTP may allow raw command to be sent, use this method. | 
|  void | setConnectionListeners(java.util.Vector<ConnectionListener> listeners)Remove a ConnectionListener. | 
|  boolean | setLocalPath(java.lang.String newPath)Set the path downloded to. | 
|  java.util.Date[] | sortDates()Get file dates. | 
|  java.lang.String[] | sortLs()Get file and diretory names. | 
|  java.lang.String[] | sortSize()Get file sizes. | 
|  int | upload(java.lang.String file)Initiate an upload in the same thread. | 
|  int | upload(java.lang.String file,
       java.io.InputStream in)Initiate a download in the same thread. | 
| Method Detail | 
|---|
void sendRawCommand(java.lang.String cmd)
cmd - void disconnect()
boolean isConnected()
java.lang.String getPWD()
boolean cdup()
boolean mkdir(java.lang.String dirName)
dirName - 
boolean rename(java.lang.String from,
               java.lang.String to)
from - to - 
void list()
          throws java.io.IOException
java.io.IOExceptionboolean chdir(java.lang.String p)
p - 
boolean chdirNoRefresh(java.lang.String p)
p - 
java.lang.String getLocalPath()
boolean setLocalPath(java.lang.String newPath)
newPath - 
java.lang.String[] sortLs()
java.lang.String[] sortSize()
java.util.Date[] sortDates()
int[] getPermissions()
int handleDownload(java.lang.String file)
file - 
int handleUpload(java.lang.String file)
file - 
int download(java.lang.String file)
file - 
int upload(java.lang.String file)
file - 
int upload(java.lang.String file,
           java.io.InputStream in)
file - 
java.io.InputStream getDownloadInputStream(java.lang.String file)
file - 
int removeFileOrDir(java.lang.String file)
file - 
void addConnectionListener(ConnectionListener listener)
listener - void setConnectionListeners(java.util.Vector<ConnectionListener> listeners)
listeners - | 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||