summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun Gupta <tarun1995gupta@gmail.com>2015-07-17 02:22:32 (GMT)
committerNick Hudson <nick.hudson@isode.com>2015-07-28 13:14:20 (GMT)
commit673655830b0325d964e67fa835ea83f485e9beeb (patch)
tree27e4f8bd20dd9011207641a83212ced393fbada2 /src/com/isode/stroke/compress
parent6f84f6a65b8b80e2f599dff76da0cd13fbead611 (diff)
downloadstroke-673655830b0325d964e67fa835ea83f485e9beeb.zip
stroke-673655830b0325d964e67fa835ea83f485e9beeb.tar.bz2
Complete StreamStack and add tests.
TLSLayer could not be updated because it requires TLS to be ported first. Updates other classes, only for having compatibility with SafeByteArray because of updates in Stream Stack. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Tests added for StreamStack and XMPPLayer, which passes. Change-Id: I8707fc1f16d622d2a90f6f39f671b7e7c46aa170
Diffstat (limited to 'src/com/isode/stroke/compress')
-rw-r--r--src/com/isode/stroke/compress/ZLibCodecompressor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/isode/stroke/compress/ZLibCodecompressor.java b/src/com/isode/stroke/compress/ZLibCodecompressor.java
index 3925949..fed1f33 100644
--- a/src/com/isode/stroke/compress/ZLibCodecompressor.java
+++ b/src/com/isode/stroke/compress/ZLibCodecompressor.java
@@ -9,7 +9,7 @@
*/
package com.isode.stroke.compress;
-import com.isode.stroke.base.ByteArray;
+import com.isode.stroke.base.SafeByteArray;
import com.jcraft.jzlib.JZlib;
import com.jcraft.jzlib.ZStream;
@@ -17,8 +17,8 @@ public abstract class ZLibCodecompressor {
protected static final int CHUNK_SIZE = 1024;
protected final ZStream stream_ = new ZStream();
- public ByteArray process(ByteArray input) throws ZLibException {
- ByteArray output = new ByteArray();
+ public SafeByteArray process(SafeByteArray input) throws ZLibException {
+ SafeByteArray output = new SafeByteArray();
stream_.avail_in = input.getSize();
stream_.next_in = input.getData();
stream_.next_in_index = 0;