Author: markt
Date: Tue Jul  5 17:28:44 2011
New Revision: 1143150

URL: http://svn.apache.org/viewvc?rev=1143150&view=rev
Log:
Review comments

Modified:
    
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java?rev=1143150&r1=1143149&r2=1143150&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
 Tue Jul  5 17:28:44 2011
@@ -82,11 +82,12 @@ public class GzipInterceptor extends Cha
      * @throws IOException
      */
     public static byte[] decompress(byte[] data) throws IOException {
-        ByteArrayOutputStream bout = new ByteArrayOutputStream();
+        ByteArrayOutputStream bout =
+            new ByteArrayOutputStream(DEFAULT_BUFFER_SIZE);
         ByteArrayInputStream bin = new ByteArrayInputStream(data);
         GZIPInputStream gin = new GZIPInputStream(bin);
         byte[] tmp = new byte[DEFAULT_BUFFER_SIZE];
-        int length = 0;
+        int length = gin.read(tmp);
         while (length > -1) {
             bout.write(tmp, 0, length);
             length = gin.read(tmp);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to