1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Add a setting for the used flush mode when compressing data

Fixes SMACK-593
This commit is contained in:
Florian Schmaus 2014-08-07 14:42:30 +02:00
parent 4e588f7908
commit c3f6c51d0e
3 changed files with 35 additions and 12 deletions

View file

@ -58,7 +58,9 @@ public class JzlibInputOutputStream extends XMPPInputOutputStream {
@Override
public OutputStream getOutputStream(OutputStream outputStream) throws IOException {
final DeflaterOutputStream os = new DeflaterOutputStream(outputStream);
os.setSyncFlush(true);
if (flushMethod == FlushMethod.SYNC_FLUSH) {
os.setSyncFlush(true);
}
return os;
}