|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.japisoft.ftpbrowser.FTPResourceManager
This is a ResourceManager for FTP content. Reset the proxyHost
and
proxyPort
System property if needed calling System.setProperty
...
ResourceManager
Constructor Summary | |
FTPResourceManager()
|
Method Summary | |
void |
deleteFile(ResourceItem item)
Delete a file or an empty directory for this path |
byte[] |
getContent(ResourceItem item)
|
boolean |
isConnectionSupported()
|
boolean |
isLockSupported()
|
ResourceItemModel |
list(ResourceItem item)
List a directory |
void |
lock(ResourceItem item,
boolean locked)
Lock this resource located at the path. |
void |
renameFile(ResourceItem item,
java.lang.String newPathName)
Rename a file name to another one. |
void |
setContent(ResourceItem item,
byte[] content)
Reset a content located at this path |
java.lang.String |
start(java.lang.String host,
java.lang.String user,
java.lang.String password)
Open a connection to a server or a specific resource. |
void |
stop()
Close the current connection |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FTPResourceManager()
Method Detail |
public java.lang.String start(java.lang.String host, java.lang.String user, java.lang.String password) throws ResourceException
ResourceManager
start
in interface ResourceManager
host
- The Remote server IP locationuser
- The user account namepassword
- The user password name
ResourceException
- If the connection cannot be openedpublic void stop()
ResourceManager
stop
in interface ResourceManager
public ResourceItemModel list(ResourceItem item) throws ResourceException
ResourceManager
list
in interface ResourceManager
item
- A directory
ResourceException
- If the listing is not possiblepublic byte[] getContent(ResourceItem item) throws ResourceException
getContent
in interface ResourceManager
item
- A location for a file
java.lang.String
ResourceException
- If the file cannot be downloadedpublic void setContent(ResourceItem item, byte[] content) throws ResourceException
ResourceManager
setContent
in interface ResourceManager
item
- A file locationcontent
- A new content
ResourceException
- If the file cannot be updatedpublic void deleteFile(ResourceItem item) throws ResourceException
ResourceManager
deleteFile
in interface ResourceManager
item
- A file or an empty directory location
ResourceException
- If the file cannot be deletedpublic void renameFile(ResourceItem item, java.lang.String newPathName) throws ResourceException
ResourceManager
renameFile
in interface ResourceManager
item
- A file or a directorynewPathName
- A new name
ResourceException
- If the file or the directory cannot be renammedpublic void lock(ResourceItem item, boolean locked) throws ResourceException
ResourceManager
isLockSupported
method returns true
lock
in interface ResourceManager
item
- A file or a directorylocked
- true
for locking the resource path
ResourceException
- If the file cannot be lockedpublic boolean isLockSupported()
isLockSupported
in interface ResourceManager
true
if the file lock if supportedpublic boolean isConnectionSupported()
isConnectionSupported
in interface ResourceManager
if an host, user and password is required before browing a content
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |