james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r743069 - /james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java
Date Tue, 10 Feb 2009 19:30:24 GMT
Author: olegk
Date: Tue Feb 10 19:30:23 2009
New Revision: 743069

URL: http://svn.apache.org/viewvc?rev=743069&view=rev
Log:
Slighly more efficient byte to ASCII char conversion

Modified:
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java?rev=743069&r1=743068&r2=743069&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/util/CharArrayBuffer.java Tue
Feb 10 19:30:23 2009
@@ -115,11 +115,7 @@
             expand(newlen);
         }
         for (int i1 = off, i2 = oldlen; i2 < newlen; i1++, i2++) {
-            int ch = b[i1]; 
-            if (ch < 0) {
-                ch = 256 + ch;
-            }
-            this.buffer[i2] = (char) ch;
+            this.buffer[i2] = (char) (b[i1] & 0xff);
         }
         this.len = newlen;
     }



Mime
View raw message