|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.ftp.FtpClient
public class FtpClient
A simple standalone FTP client.
| Method Summary | |
|---|---|
void |
changeDirectoryUp()
Change to the parent directory (CDUP). |
void |
changeWorkingDirectory(java.lang.String dir)
Change the working directory (CWD). |
void |
close()
Close the connection (QUIT). |
boolean |
exists(java.lang.String dir,
java.lang.String name)
Check if a file exists on the FTP server. |
java.lang.String |
list(java.lang.String dir)
Get the directory listing (LIST). |
java.io.File[] |
listFiles(java.lang.String dir)
List the files on the FTP server. |
void |
login(java.lang.String userName,
java.lang.String password)
Login to this FTP server (USER, PASS, SYST, SITE, STRU F, TYPE I). |
void |
makeDirectory(java.lang.String dir)
Create a directory (MKD). |
java.lang.String |
nameList(java.lang.String dir)
Get the directory listing (NLST). |
static FtpClient |
open(java.lang.String url)
Open an FTP connection. |
void |
removeDirectory(java.lang.String dir)
Remove a directory (RMD). |
void |
removeDirectoryRecursive(java.lang.String dir)
Remove all files and directory in a directory, and then delete the directory itself. |
byte[] |
retrieve(java.lang.String fileName)
Read a file. |
void |
store(java.lang.String fileName,
java.io.InputStream in)
Store a file (STOR). |
void |
storeRecursive(java.io.File file)
Copy a local file or directory to the FTP server, recursively. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FtpClient open(java.lang.String url)
throws java.io.IOException
url - the FTP URL
java.io.IOException
public void login(java.lang.String userName,
java.lang.String password)
throws java.io.IOException
userName - the user namepassword - the password
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public void changeWorkingDirectory(java.lang.String dir)
throws java.io.IOException
dir - the new directory
java.io.IOException
public void changeDirectoryUp()
throws java.io.IOException
java.io.IOException
public void makeDirectory(java.lang.String dir)
throws java.io.IOException
dir - the directory to create
java.io.IOException
public byte[] retrieve(java.lang.String fileName)
throws java.io.IOException
fileName - the file name
java.io.IOException
public void removeDirectory(java.lang.String dir)
throws java.io.IOException
dir - the directory to remove
java.io.IOException
public void removeDirectoryRecursive(java.lang.String dir)
throws java.io.IOException
dir - the directory to remove
java.io.IOException
public void store(java.lang.String fileName,
java.io.InputStream in)
throws java.io.IOException
fileName - the file namein - the input stream
java.io.IOException
public void storeRecursive(java.io.File file)
throws java.io.IOException
file - the file to copy
java.io.IOException
public java.lang.String nameList(java.lang.String dir)
throws java.io.IOException
dir - the directory
java.io.IOException
public java.lang.String list(java.lang.String dir)
throws java.io.IOException
dir - the directory
java.io.IOException
public boolean exists(java.lang.String dir,
java.lang.String name)
throws java.io.IOException
dir - the directoryname - the directory or file name
java.io.IOException
public java.io.File[] listFiles(java.lang.String dir)
throws java.io.IOException
dir - the directory
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||