commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1084257 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/telnet/TelnetClient.java
Date Tue, 22 Mar 2011 17:16:08 GMT
Author: sebb
Date: Tue Mar 22 17:16:08 2011
New Revision: 1084257

URL: http://svn.apache.org/viewvc?rev=1084257&view=rev
Log:
NET-89 NET-387 TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks
binary mode.

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetClient.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=1084257&r1=1084256&r2=1084257&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Mar 22 17:16:08 2011
@@ -57,6 +57,10 @@ The <action> type attribute can be add,u
 
     <body>
         <release version="3.0" date="TBA" description="TBA">
+            <action issue="NET-89" dev="sebb" type="fix">
+            TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks
binary mode.
+            See also NET-387.
+            </action>
             <action issue="NET-385" dev="sebb" type="update">
             FTP does not apply timeout to initial responses.
             </action>

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetClient.java?rev=1084257&r1=1084256&r2=1084257&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetClient.java
Tue Mar 22 17:16:08 2011
@@ -22,9 +22,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.commons.net.io.FromNetASCIIInputStream;
-import org.apache.commons.net.io.ToNetASCIIOutputStream;
-
 /***
  * The TelnetClient class implements the simple network virtual
  * terminal (NVT) for the Telnet protocol according to RFC 854.  It
@@ -94,16 +91,7 @@ public class TelnetClient extends Telnet
     protected void _connectAction_() throws IOException
     {
         super._connectAction_();
-        InputStream input;
-        TelnetInputStream tmp;
-
-        if (FromNetASCIIInputStream.isConversionRequired())
-            input = new FromNetASCIIInputStream(_input_);
-        else
-            input = _input_;
-
-
-        tmp = new TelnetInputStream(input, this, readerThread);
+        TelnetInputStream tmp = new TelnetInputStream(_input_, this, readerThread);
         if(readerThread)
         {
             tmp._start();
@@ -115,7 +103,7 @@ public class TelnetClient extends Telnet
         // now it looks like classes like InputStreamReader are not implemented
         // in a safe manner.
         __input = new BufferedInputStream(tmp);
-        __output = new ToNetASCIIOutputStream(new TelnetOutputStream(this));
+        __output = new TelnetOutputStream(this);
     }
 
     /***



Mime
View raw message