boolean answer = super.compressClient(doc);
if (answer) {
XmlPullParser xpp = socketReader.reader.getXPPParser();
// Reset the parser since a new stream header has been sent from the client
if (socketReader.connection.getTLSStreamHandler() == null) {
ZInputStream in = new ZInputStream(
ServerTrafficCounter.wrapInputStream(socket.getInputStream()));
in.setFlushMode(JZlib.Z_PARTIAL_FLUSH);
xpp.setInput(new InputStreamReader(in, CHARSET));
}
else {
ZInputStream in = new ZInputStream(
socketReader.connection.getTLSStreamHandler().getInputStream());
in.setFlushMode(JZlib.Z_PARTIAL_FLUSH);
xpp.setInput(new InputStreamReader(in, CHARSET));
}
}
return answer;
}