--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2010/11/08 13:22:51 1189 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2010/11/12 18:33:38 1190 @@ -1,9 +1,9 @@ package dk.thoerup.traininfoservice.banedk; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.io.StringWriter; import java.util.logging.Level; import java.util.logging.Logger; @@ -142,7 +142,7 @@ Serializer serializer = new Persister(); - ByteArrayOutputStream out = new ByteArrayOutputStream(); + StringWriter out = new StringWriter(); try { serializer.write(beans, out); @@ -159,7 +159,7 @@ Transformer trans = xslTemplate.newTransformer(); Source xml = new StreamSource( new ByteArrayInputStream(input.getBytes() )); - ByteArrayOutputStream out = new ByteArrayOutputStream(); + StringWriter out = new StringWriter(); trans.transform(xml, new StreamResult(out)); return out.toString();