|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.sauronsoftware.ftp4j.FTPCommunicationChannel
public class FTPCommunicationChannel
This class is used to represent a communication channel with a FTP server.
Constructor Summary | |
---|---|
FTPCommunicationChannel(java.net.Socket connection,
java.lang.String charsetName)
It builds a FTP communication channel. |
Method Summary | |
---|---|
void |
addCommunicationListener(FTPCommunicationListener listener)
This method adds a FTPCommunicationListener to the object. |
void |
changeCharset(java.lang.String charsetName)
Changes the current charset. |
void |
close()
Closes the channel. |
FTPCommunicationListener[] |
getCommunicationListeners()
This method returns a list with all the FTPCommunicationListener used by the client. |
FTPReply |
readFTPReply()
This method reads and parses a FTP reply statement from the server. |
void |
removeCommunicationListener(FTPCommunicationListener listener)
This method removes a FTPCommunicationListener previously added to the object. |
void |
sendFTPCommand(java.lang.String command)
This method sends a command line to the server. |
void |
ssl(javax.net.ssl.SSLSocketFactory sslSocketFactory)
Applies SSL encryption to the communication channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTPCommunicationChannel(java.net.Socket connection, java.lang.String charsetName) throws java.io.IOException
connection
- The underlying connection.charsetName
- The name of the charset that has to be used to encode and
decode the communication.
java.io.IOException
- If a I/O error occurs.Method Detail |
---|
public void addCommunicationListener(FTPCommunicationListener listener)
listener
- The listener.public void removeCommunicationListener(FTPCommunicationListener listener)
listener
- The listener to be removed.public void close()
public FTPCommunicationListener[] getCommunicationListeners()
public void sendFTPCommand(java.lang.String command) throws java.io.IOException
command
- The command to be sent.
java.io.IOException
- If an I/O error occurs.public FTPReply readFTPReply() throws java.io.IOException, FTPIllegalReplyException
java.io.IOException
- If an I/O error occurs.
FTPIllegalReplyException
- If the server doesn't reply in a FTP-compliant way.public void changeCharset(java.lang.String charsetName) throws java.io.IOException
charsetName
- The new charset.
java.io.IOException
- If I/O error occurs.public void ssl(javax.net.ssl.SSLSocketFactory sslSocketFactory) throws java.io.IOException
sslSocketFactory
- The SSLSocketFactory used to produce the SSL connection.
java.io.IOException
- If a I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |