diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-28 11:45:21 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-07 11:17:50 (GMT) |
commit | eca0a80a7abb136094f252872499c59803999f85 (patch) | |
tree | d81af1e61d3b05567acc05199425829fc33320c8 /src/com/isode/stroke/base | |
parent | 0b55e5cf189e61d1dafbc011ee853d74509604d8 (diff) | |
download | stroke-eca0a80a7abb136094f252872499c59803999f85.zip stroke-eca0a80a7abb136094f252872499c59803999f85.tar.bz2 |
Using JZlib for compression, as features we need aren't in Java until 1.7
Diffstat (limited to 'src/com/isode/stroke/base')
-rw-r--r-- | src/com/isode/stroke/base/ByteArray.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/isode/stroke/base/ByteArray.java b/src/com/isode/stroke/base/ByteArray.java index 8b140ed..077c58c 100644 --- a/src/com/isode/stroke/base/ByteArray.java +++ b/src/com/isode/stroke/base/ByteArray.java @@ -149,8 +149,13 @@ public class ByteArray { * * @return a reference to the updated object */ - private ByteArray append(byte[] b) { - for (int i = 0; i < b.length; i++) { + public ByteArray append(byte[] b) { + return append(b, b.length); + } + + /** Mutable add */ + public ByteArray append(byte[] b, int len) { + for (int i = 0; i < len; i++) { append(b[i]); } return this; |