diff --git a/src/main/java/com/github/olivergondza/saxeed/Target.java b/src/main/java/com/github/olivergondza/saxeed/Target.java index f58e05c..549c542 100644 --- a/src/main/java/com/github/olivergondza/saxeed/Target.java +++ b/src/main/java/com/github/olivergondza/saxeed/Target.java @@ -6,12 +6,12 @@ import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStream; import java.nio.file.Path; -import java.util.Objects; /** * Target to write the resulting content into. @@ -70,7 +70,7 @@ public TransformationHandler getHandler(TransformationBuilder builder, XMLOutput private OutputStream getOutputStream() throws FailedWriting { try { - return new FileOutputStream(file); + return new BufferedOutputStream(new FileOutputStream(file)); } catch (FileNotFoundException e) { throw new FailedWriting("Cannot create/open file: " + file.getAbsolutePath(), e); }