aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xml
diff options
context:
space:
mode:
authorRene Treffer <treffer@measite.de>2014-04-03 18:16:14 +0200
committerRene Treffer <treffer@measite.de>2014-04-03 18:37:25 +0200
commit9502ff25dd6c32c92d356baaaa1640fe26314595 (patch)
tree7767f2193bd2233b3275db2342c36d6e08eeac4f /src/eu/siacs/conversations/xml
parent2506ef82df6369fef71e00e891b2a2c69330ff94 (diff)
Add compression support
Diffstat (limited to 'src/eu/siacs/conversations/xml')
-rw-r--r--src/eu/siacs/conversations/xml/TagWriter.java8
-rw-r--r--src/eu/siacs/conversations/xml/XmlReader.java6
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 f06664fd..d945b47b 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 7ae9a7b3..71e86cf9 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));