Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/org/adblockplus/ChunkedOutputStream.java

Issue 6002714978811904: Line endings, whitespace, imports and casts cleanup (Closed)
Patch Set: Created March 31, 2014, 1:52 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/org/adblockplus/android/ABPEngine.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 import java.io.IOException; 21 import java.io.IOException;
22 import java.io.OutputStream; 22 import java.io.OutputStream;
23 23
24 /** 24 /**
25 * ChunkedOutputStream implements chunked HTTP transfer encoding wrapper for 25 * ChunkedOutputStream implements chunked HTTP transfer encoding wrapper for
26 * OutputStream. 26 * OutputStream.
27 */ 27 */
28 public class ChunkedOutputStream extends FilterOutputStream 28 public class ChunkedOutputStream extends FilterOutputStream
29 { 29 {
30 private static final int MAX_CHUNK_SIZE = 2048; 30 private static final int MAX_CHUNK_SIZE = 2048;
31 31
32 private static final byte[] CRLF = {'\r', '\n'}; 32 private static final byte[] CRLF = {'\r', '\n'};
33 private static final byte[] FINAL_CHUNK = new byte[] {'0', '\r', '\n', '\r', ' \n'}; 33 private static final byte[] FINAL_CHUNK = new byte[] {'0', '\r', '\n', '\r', ' \n'};
34 private boolean wroteFinalChunk = false; 34 private boolean wroteFinalChunk = false;
35 35
36 public ChunkedOutputStream(OutputStream out) 36 public ChunkedOutputStream(OutputStream out)
37 { 37 {
38 super(out); 38 super(out);
39 } 39 }
40 40
41 @Override 41 @Override
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 out.flush(); 97 out.flush();
98 } 98 }
99 } 99 }
100 100
101 private void writeHex(int i) throws IOException 101 private void writeHex(int i) throws IOException
102 { 102 {
103 out.write(Integer.toHexString(i).getBytes()); 103 out.write(Integer.toHexString(i).getBytes());
104 out.write(CRLF); 104 out.write(CRLF);
105 } 105 }
106 } 106 }
OLDNEW
« no previous file with comments | « no previous file | src/org/adblockplus/android/ABPEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld