diff options
author | Rene Treffer <treffer@measite.de> | 2014-04-03 18:16:14 +0200 |
---|---|---|
committer | Rene Treffer <treffer@measite.de> | 2014-04-03 18:37:25 +0200 |
commit | 9502ff25dd6c32c92d356baaaa1640fe26314595 (patch) | |
tree | 7767f2193bd2233b3275db2342c36d6e08eeac4f /src/eu/siacs/conversations/xml | |
parent | 2506ef82df6369fef71e00e891b2a2c69330ff94 (diff) |
Add compression support
Diffstat (limited to 'src/eu/siacs/conversations/xml')
-rw-r--r-- | src/eu/siacs/conversations/xml/TagWriter.java | 8 | ||||
-rw-r--r-- | src/eu/siacs/conversations/xml/XmlReader.java | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xml/TagWriter.java b/src/eu/siacs/conversations/xml/TagWriter.java index f06664fdd..d945b47b5 100644 --- a/src/eu/siacs/conversations/xml/TagWriter.java +++ b/src/eu/siacs/conversations/xml/TagWriter.java @@ -9,6 +9,7 @@ import eu.siacs.conversations.xmpp.stanzas.AbstractStanza; public class TagWriter { + private OutputStream plainOutputStream; private OutputStreamWriter outputStream; private boolean finshed = false; private LinkedBlockingQueue<AbstractStanza> writeQueue = new LinkedBlockingQueue<AbstractStanza>(); @@ -37,9 +38,14 @@ public class TagWriter { } public void setOutputStream(OutputStream out) { + this.plainOutputStream = out; this.outputStream = new OutputStreamWriter(out); } - + + public OutputStream getOutputStream() { + return this.plainOutputStream; + } + public TagWriter beginDocument() throws IOException { outputStream.write("<?xml version='1.0'?>"); outputStream.flush(); diff --git a/src/eu/siacs/conversations/xml/XmlReader.java b/src/eu/siacs/conversations/xml/XmlReader.java index 7ae9a7b38..71e86cf9c 100644 --- a/src/eu/siacs/conversations/xml/XmlReader.java +++ b/src/eu/siacs/conversations/xml/XmlReader.java @@ -36,7 +36,11 @@ public class XmlReader { Log.d(LOGTAG,"error setting input stream"); } } - + + public InputStream getInputStream() { + return is; + } + public void reset() { try { parser.setInput(new InputStreamReader(this.is)); |