commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r165001 - /jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java
Date Wed, 27 Apr 2005 16:01:42 GMT
Author: jfclere
Date: Wed Apr 27 09:01:42 2005
New Revision: 165001

URL: http://svn.apache.org/viewcvs?rev=165001&view=rev
Log:
Make sure that ASCII is send to the client.

Modified:
    jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java

Modified: jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java?rev=165001&r1=165000&r2=165001&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java (original)
+++ jakarta/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Wed Apr 27 09:01:42
2005
@@ -220,7 +220,12 @@
         }
 
         public void handle(InputStream in, OutputStream os) {
-            PrintStream out=new PrintStream(os);
+            PrintStream out=null;
+            try {
+                out=new PrintStream(os, true, "US-ASCII");
+            } catch (UnsupportedEncodingException ex) {
+                out=new PrintStream(os);
+            }
 
             while(true) {
                 try {



---------------------------------------------------------------------
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