diff --git a/matsim/src/main/java/org/matsim/core/population/io/AbstractPopulationWriterHandler.java b/matsim/src/main/java/org/matsim/core/population/io/AbstractPopulationWriterHandler.java index 9208db8e875..95a99b66e50 100644 --- a/matsim/src/main/java/org/matsim/core/population/io/AbstractPopulationWriterHandler.java +++ b/matsim/src/main/java/org/matsim/core/population/io/AbstractPopulationWriterHandler.java @@ -77,7 +77,6 @@ else if (pe instanceof Leg) { } this.endPerson(writer); this.writeSeparator(writer); - writer.flush(); } public abstract void startPerson(final Person person, final BufferedWriter out) throws IOException; diff --git a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV0.java b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV0.java index 0009ba521e6..057684fb2f6 100644 --- a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV0.java +++ b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV0.java @@ -75,6 +75,7 @@ public void startPlans(final Population plans, final BufferedWriter out) throws @Override public void endPlans(final BufferedWriter out) throws IOException { out.write("\n"); + out.flush(); } ////////////////////////////////////////////////////////////////////// diff --git a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV4.java b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV4.java index 493ec680d06..c66dd9f57cc 100644 --- a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV4.java +++ b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV4.java @@ -82,6 +82,7 @@ public void startPlans(final Population plans, final BufferedWriter out) throws @Override public void endPlans(final BufferedWriter out) throws IOException { out.write("\n"); + out.flush(); } ////////////////////////////////////////////////////////////////////// diff --git a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV5.java b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV5.java index 7d1c42fe0b9..5ca46309074 100644 --- a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV5.java +++ b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV5.java @@ -99,12 +99,12 @@ else if (pe instanceof Leg) { } PopulationWriterHandlerImplV5.endPerson(out); this.writeSeparator(out); - out.flush(); } @Override public void endPlans(final BufferedWriter out) throws IOException { out.write("\n"); + out.flush(); } private static void startPerson(final Person person, final BufferedWriter out) throws IOException { diff --git a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV6.java b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV6.java index 67ff8fada0a..7d23d6c976a 100644 --- a/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV6.java +++ b/matsim/src/main/java/org/matsim/core/population/io/PopulationWriterHandlerImplV6.java @@ -119,12 +119,12 @@ else if (pe instanceof Leg) { } PopulationWriterHandlerImplV6.endPerson(out); this.writeSeparator(out); - out.flush(); } @Override public void endPlans(final BufferedWriter out) throws IOException { out.write("\n"); + out.flush(); } private void startPerson(final Person person, final BufferedWriter out) throws IOException {