Add a pair of methods to help optimize countingmessagestream

This commit is contained in:
Jesse Vincent 2011-03-27 23:06:26 +08:00
parent 604e532879
commit 4f63a3de24
1 changed files with 6 additions and 0 deletions

View File

@ -21,4 +21,10 @@ public class CountingOutputStream extends OutputStream {
public void write(int oneByte) throws IOException {
mCount++;
}
public void write(byte b[], int offset, int len) throws IOException {
mCount += len;
}
public void write(byte[] b) throws IOException {
mCount += b.length;
}
}