|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocal.tomas.util.net.BaseClient
local.tomas.util.net.FtpClient
public class FtpClient
Title: FTP Client Description: Copyright: Copyright (c) 2001 Company:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class local.tomas.util.net.BaseClient |
|---|
BaseClient.NetAck |
| Field Summary |
|---|
| Fields inherited from class local.tomas.util.net.BaseClient |
|---|
cmd, cmdIn, cmdOut |
| Constructor Summary | |
|---|---|
FtpClient()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
ascii()
Switch to text mode. |
void |
bin()
Switch to binary mode. |
void |
cdup()
Change working directory on server to parent directory. |
void |
close()
Close connection. |
void |
connect(String host)
Connect to host on default FTP port. |
void |
cwd(String wd)
Change working directory on server. |
void |
delete(String fileName)
Remove remote file. |
String |
getwd()
Get current remote working directory. |
InputStream |
list(String fileName)
List remote files. |
void |
login(String user,
String password)
Login to FTP server. |
void |
mkdir(String dirName)
Create remote directory. |
Iterator<String> |
nameList(String fileName)
Iterate over list of remote files. |
void |
noop()
Send no operation command. |
void |
port(InetAddress addr,
int port)
Send port command. |
void |
rename(String from,
String to)
Rename remote file. |
InputStream |
retrieve(String fileName)
Open remote file for retrieval. |
void |
rmdir(String dirName)
Remove remote directory. |
OutputStream |
send(String fileName)
Open output stream to remote file. |
| Methods inherited from class local.tomas.util.net.BaseClient |
|---|
connect, getAck, sendCommand |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FtpClient()
| Method Detail |
|---|
public void connect(String host)
throws NetException
host -
NetException
public void login(String user,
String password)
throws NetException
user - user namepassword - password
NetException
public void close()
throws NetException
BaseClient
close in class BaseClientNetException
public void cwd(String wd)
throws NetException
wd - new working directory
NetException
public void cdup()
throws NetException
NetException
public void port(InetAddress addr,
int port)
throws NetException
addr - address of portport - port number
NetException
public void noop()
throws NetException
NetException
public void bin()
throws NetException
NetException
public void ascii()
throws NetException
NetException
public InputStream retrieve(String fileName)
throws NetException
fileName - remote file name
NetException
public OutputStream send(String fileName)
throws NetException
fileName - remote file name
NetException
public InputStream list(String fileName)
throws NetException
fileName - directory name or null if current directory
NetException
public Iterator<String> nameList(String fileName)
throws NetException
fileName - directory name or null if current directory
NetException
public void rename(String from,
String to)
throws NetException
from - old nameto - new name
NetException
public void delete(String fileName)
throws NetException
fileName - file name
NetException
public void mkdir(String dirName)
throws NetException
dirName - directory name
NetException
public void rmdir(String dirName)
throws NetException
dirName - directory name
NetException
public String getwd()
throws NetException
NetException
|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||