|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javatools.ftp.FTPClientImpl
An FTP client class which implements remote peer-to-peer transfer.
Field Summary | |
(package private) java.lang.String |
code
|
(package private) java.net.Socket |
controlSocket
|
(package private) java.lang.String |
host
|
(package private) java.io.BufferedReader |
is
|
(package private) int |
localDataPort
|
(package private) java.net.InetAddress |
localInetAddress
|
(package private) boolean |
Mode
|
(package private) java.io.BufferedWriter |
ps
|
(package private) java.lang.String |
response
|
(package private) java.lang.String |
user
|
Fields inherited from interface javatools.ftp.FTPClient |
DIRECTORY, FILE, GETFILE, GETLIST, LINK, UNKNOWN |
Constructor Summary | |
FTPClientImpl()
|
Method Summary | |
long |
bytesTransf()
Gets the number of bytes read |
void |
cwd(java.lang.String dir)
Change to the specified directory, which may be relative or absolute. |
void |
delete(java.lang.String sDirectory,
java.lang.String sFile)
Delete the File |
(package private) java.lang.String |
extractPortAddress(java.lang.String s)
Parses a port address from the string returned by the "pasv" FTP command. |
java.util.Vector |
list()
Request a listing of the current directory. |
(package private) java.lang.String |
makePortAddress(java.net.InetAddress inad,
int port)
Manufacture the kind of host/port address required by FTP. |
void |
openConnection(java.lang.String host,
java.lang.String user,
java.lang.String password)
Open a connection to a remote host that runs an FTP server. |
void |
quit()
Close ftp connection |
void |
readResponse()
Read a response from the host. |
void |
receive(java.lang.String directory,
java.lang.String filename,
FTPVisitor ftpVisitor)
Request to receive the specified file. |
java.lang.String |
retResponse()
Returns FTP server response |
void |
send(java.lang.String sDirectory,
java.lang.String filename,
FTPSender ftpSender)
Request that the host send a file to another host. |
void |
sendCommand(java.lang.String command)
Send a command to the host, and read the response. |
void |
setAscii()
Set the transfer mode to Ascii. |
void |
setBinary()
Set the transfer mode to Image (also referred to as "binary"). |
(package private) java.lang.String |
toUnsignedDecimal(byte b)
Utility function to convert a byte to an unsigned decimal string representation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.lang.String host
java.lang.String user
java.net.InetAddress localInetAddress
int localDataPort
boolean Mode
java.lang.String response
java.io.BufferedReader is
java.io.BufferedWriter ps
java.lang.String code
java.net.Socket controlSocket
Constructor Detail |
public FTPClientImpl()
Method Detail |
public void openConnection(java.lang.String host, java.lang.String user, java.lang.String password) throws java.io.IOException, java.lang.Exception
openConnection
in interface FTPClient
java.io.IOException
java.lang.Exception
public void quit() throws java.io.IOException, java.lang.Exception
FTPClient
quit
in interface FTPClient
java.io.IOException
java.lang.Exception
public void sendCommand(java.lang.String command) throws java.io.IOException, java.lang.Exception
sendCommand
in interface FTPClient
java.io.IOException
java.lang.Exception
public void readResponse() throws java.io.IOException
readResponse
in interface FTPClient
java.io.IOException
java.lang.String makePortAddress(java.net.InetAddress inad, int port)
java.lang.String toUnsignedDecimal(byte b)
public void setAscii() throws java.io.IOException, java.lang.Exception
setAscii
in interface FTPClient
java.io.IOException
java.lang.Exception
public void setBinary() throws java.io.IOException, java.lang.Exception
setBinary
in interface FTPClient
java.io.IOException
java.lang.Exception
public void cwd(java.lang.String dir) throws java.io.IOException, java.lang.Exception
cwd
in interface FTPClient
java.io.IOException
java.lang.Exception
public void delete(java.lang.String sDirectory, java.lang.String sFile) throws java.io.IOException, java.lang.Exception
delete
in interface FTPClient
java.io.IOException
java.lang.Exception
public void send(java.lang.String sDirectory, java.lang.String filename, FTPSender ftpSender) throws java.io.IOException, java.lang.Exception
send
in interface FTPClient
java.io.IOException
java.lang.Exception
public java.util.Vector list() throws java.io.IOException, java.lang.Exception
list
in interface FTPClient
java.io.IOException
java.lang.Exception
public void receive(java.lang.String directory, java.lang.String filename, FTPVisitor ftpVisitor) throws java.io.IOException, java.lang.Exception
receive
in interface FTPClient
java.io.IOException
java.lang.Exception
java.lang.String extractPortAddress(java.lang.String s) throws java.lang.Exception
java.lang.Exception
public long bytesTransf()
bytesTransf
in interface FTPClient
public java.lang.String retResponse()
retResponse
in interface FTPClient
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |