You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rd...@apache.org on 2008/04/04 21:16:17 UTC

svn commit: r644832 - /james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java

Author: rdonkin
Date: Fri Apr  4 12:16:17 2008
New Revision: 644832

URL: http://svn.apache.org/viewvc?rev=644832&view=rev
Log:
Introduce constants

Modified:
    james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java

Modified: james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java?rev=644832&r1=644831&r2=644832&view=diff
==============================================================================
--- james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java (original)
+++ james/server/trunk/core-library/src/main/java/org/apache/james/core/AbstractJamesHandler.java Fri Apr  4 12:16:17 2008
@@ -52,6 +52,10 @@
 public abstract class AbstractJamesHandler extends AbstractLogEnabled implements ConnectionHandler, Poolable,Serviceable {
 
 
+    private static final int DEFAULT_OUTPUT_BUFFER_SIZE = 1024;
+
+    private static final int DEFAULT_INPUT_BUFFER_SIZE = 1024;
+
     /**
      * The thread executing this handler
      */
@@ -146,17 +150,17 @@
             synchronized (this) {
                 handlerThread = Thread.currentThread();
             }
-            in = new BufferedInputStream(socket.getInputStream(), 1024);
-            // An ASCII encoding can be used because all transmissions other
-            // that those in the message body command are guaranteed
-            // to be ASCII
-            
-            outs = new BufferedOutputStream(socket.getOutputStream(), 1024);
+            in = new BufferedInputStream(socket.getInputStream(), DEFAULT_INPUT_BUFFER_SIZE);
+            outs = new BufferedOutputStream(socket.getOutputStream(), DEFAULT_OUTPUT_BUFFER_SIZE);
             // enable tcp dump for debug
             if (tcplogprefix != null) {
                 outs = new SplitOutputStream(outs, new FileOutputStream(tcplogprefix+"out"));
                 in = new CopyInputStream(in, new FileOutputStream(tcplogprefix+"in"));
             }
+            
+            // An ASCII encoding can be used because all transmissions other
+            // that those in the message body command are guaranteed
+            // to be ASCII
             inReader = new CRLFTerminatedReader(in, "ASCII");
             
             out = new InternetPrintWriter(outs, true);



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