Permalink
Browse files

flushed OutputStreamWriter in XMLSerializer

  • Loading branch information...
1 parent 3047f85 commit 753ccff4d9e3adb8055493966578ce565bfd97ef @eengbrec eengbrec committed Oct 1, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/scala/com/codecommit/antixml/XMLSerializer.scala
@@ -63,7 +63,9 @@ class XMLSerializer(encoding: String, outputDeclaration: Boolean) {
* Uses the character encoding of this XMLSerializer (default is UTF-8).
*/
def serializeDocument(elem: Elem, o: OutputStream) {
- serializeDocument(elem, new OutputStreamWriter(o, encoding))
+ val writer = new OutputStreamWriter(o, encoding)
+ serializeDocument(elem, writer)
+ writer.flush()
}
def serializeDocument(elem: Elem, outputFile: File) {

0 comments on commit 753ccff

Please sign in to comment.