commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1196055 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/ftp/FTPClient.java
Date Tue, 01 Nov 2011 15:26:51 GMT
Author: sebb
Date: Tue Nov  1 15:26:51 2011
New Revision: 1196055

URL: http://svn.apache.org/viewvc?rev=1196055&view=rev
Log:
NET-425 _openDataConnection_, __storeFile, and __storeFileStream should be protected and take
String for FTP command.

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1196055&r1=1196054&r2=1196055&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Nov  1 15:26:51 2011
@@ -59,6 +59,9 @@ The <action> type attribute can be add,u
         <release version="3.0.2-SNAPSHOT" date="TBA" description="
 TBA
         ">
+            <action issue="NET-425" dev="sebb" type="add">
+            _openDataConnection_, __storeFile, and __storeFileStream should be protected
and take String for FTP command.
+            </action>
             <action issue="NET-416" dev="sebb" type="update">
             Increasing sub-negotiation message holder array size
             </action>

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1196055&r1=1196054&r2=1196055&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Tue Nov
 1 15:26:51 2011
@@ -545,6 +545,12 @@ implements Configurable
     private boolean __storeFile(int command, String remote, InputStream local)
     throws IOException
     {
+    	return _storeFile(FTPCommand.getCommand(command), remote, local);
+    }
+    
+    protected boolean _storeFile(String command, String remote, InputStream local)
+    throws IOException
+    {
         OutputStream output;
         Socket socket;
 
@@ -588,6 +594,12 @@ implements Configurable
     private OutputStream __storeFileStream(int command, String remote)
     throws IOException
     {
+    	return _storeFileStream(FTPCommand.getCommand(command), remote);
+    }
+
+    protected OutputStream _storeFileStream(String command, String remote)
+    throws IOException
+    {
         OutputStream output;
         Socket socket;
 
@@ -633,6 +645,12 @@ implements Configurable
     protected Socket _openDataConnection_(int command, String arg)
     throws IOException
     {
+    	return _openDataConnection_(FTPCommand.getCommand(command), arg);
+    }
+
+    protected Socket _openDataConnection_(String command, String arg)
+    throws IOException
+    {
         Socket socket;
 
         if (__dataConnectionMode != ACTIVE_LOCAL_DATA_CONNECTION_MODE &&



Mime
View raw message