You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/05/03 09:31:30 UTC

svn commit: r1793632 - /tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java

Author: markt
Date: Wed May  3 09:31:30 2017
New Revision: 1793632

URL: http://svn.apache.org/viewvc?rev=1793632&view=rev
Log:
Clean-up. No functional change.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java?rev=1793632&r1=1793631&r2=1793632&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java Wed May  3 09:31:30 2017
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.coyote.http11.filters;
 
 import java.io.IOException;
@@ -32,25 +31,8 @@ import org.apache.tomcat.util.buf.HexUti
  */
 public class ChunkedOutputFilter implements OutputFilter {
 
-
-    // -------------------------------------------------------------- Constants
-    private static final byte[] END_CHUNK_BYTES = {(byte) '0', (byte) '\r', (byte) '\n',
-            (byte) '\r', (byte) '\n'};
-
-
-    // ------------------------------------------------------------ Constructor
-
-
-    /**
-     * Default constructor.
-     */
-    public ChunkedOutputFilter() {
-        chunkHeader.put(8, (byte) '\r');
-        chunkHeader.put(9, (byte) '\n');
-    }
-
-
-    // ----------------------------------------------------- Instance Variables
+    private static final byte[] END_CHUNK_BYTES =
+        {(byte) '0', (byte) '\r', (byte) '\n', (byte) '\r', (byte) '\n'};
 
 
     /**
@@ -71,7 +53,10 @@ public class ChunkedOutputFilter impleme
     protected final ByteBuffer endChunk = ByteBuffer.wrap(END_CHUNK_BYTES);
 
 
-    // ------------------------------------------------------------- Properties
+    public ChunkedOutputFilter() {
+        chunkHeader.put(8, (byte) '\r');
+        chunkHeader.put(9, (byte) '\n');
+    }
 
 
     // --------------------------------------------------- OutputBuffer Methods
@@ -96,7 +81,6 @@ public class ChunkedOutputFilter impleme
         buffer.doWrite(chunkHeader);
 
         return result;
-
     }
 
 
@@ -121,7 +105,6 @@ public class ChunkedOutputFilter impleme
 
     // --------------------------------------------------- OutputFilter Methods
 
-
     /**
      * Some filters need additional parameters from the response. All the
      * necessary reading can occur in that method, as this method is called
@@ -147,15 +130,13 @@ public class ChunkedOutputFilter impleme
      * buffer.doWrite during the execution of this method.
      */
     @Override
-    public long end()
-        throws IOException {
+    public long end() throws IOException {
 
         // Write end chunk
         buffer.doWrite(endChunk);
         endChunk.position(0).limit(endChunk.capacity());
 
         return 0;
-
     }
 
 



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