commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r437155 - in /jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net: ftp/FTPSClient.java ntp/NtpV3Impl.java
Date Sat, 26 Aug 2006 12:24:34 GMT
Author: rwinston
Date: Sat Aug 26 05:24:34 2006
New Revision: 437155

URL: http://svn.apache.org/viewvc?rev=437155&view=rev
Log:
* Changed double-check lock var to be volatile (works under Tiger)
* Added FTPSClient example 

Modified:
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPSClient.java
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java

Modified: jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPSClient.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPSClient.java?rev=437155&r1=437154&r2=437155&view=diff
==============================================================================
--- jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPSClient.java
(original)
+++ jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPSClient.java
Sat Aug 26 05:24:34 2006
@@ -43,6 +43,23 @@
 
 /**
  * FTP over SSL processing.
+ * 
+ * <p>For example:
+ * <p>
+ * <code>
+ *  FTPSClient client = new FTPSClient();
+ *	client.setReaderThread(false);
+ *	client.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
+ *	client.connect("127.0.0.1");
+ *	client.login(username, password);
+ *	
+ *	for (FTPFile file : client.listFiles()) {
+ *		System.out.printf("%s [%d bytes]\n", file.getName(), file.getSize());
+ *	}
+ *	
+ * 	client.disconnect();
+ *	</code>
+ * 	</p>
  */
 public class FTPSClient extends FTPClient {
 
@@ -405,9 +422,9 @@
         socket.startHandshake();
 
         _socket_ = socket;
-        _controlInput = new BufferedReader(new InputStreamReader(
+        _controlInput_ = new BufferedReader(new InputStreamReader(
                 socket .getInputStream(), getControlEncoding()));
-        _controlOutput = new BufferedWriter(new OutputStreamWriter(
+        _controlOutput_ = new BufferedWriter(new OutputStreamWriter(
                 socket.getOutputStream(), getControlEncoding()));
     }
 

Modified: jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java?rev=437155&r1=437154&r2=437155&view=diff
==============================================================================
--- jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java
(original)
+++ jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ntp/NtpV3Impl.java
Sat Aug 26 05:24:34 2006
@@ -55,7 +55,7 @@
 
     private byte[] buf = new byte[48];
 
-    private DatagramPacket dp;
+    private volatile DatagramPacket dp;
 
     /** Creates a new instance of NtpV3Impl */
     public NtpV3Impl()



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message