From a48e3fbd61b59063375db58f220bb7f6e06f2592 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sun, 26 Feb 2017 13:51:19 +0300 Subject: [PATCH] Write debug information via buffered stream --- tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java index 473f06bb0..ed11aab4d 100644 --- a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java +++ b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java @@ -15,6 +15,7 @@ */ package org.teavm.tooling; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -487,8 +488,8 @@ public class TeaVMTool implements BaseTeaVMTool { if (debugInformationGenerated) { assert debugEmitter != null; DebugInformation debugInfo = debugEmitter.getDebugInformation(); - try (OutputStream debugInfoOut = new FileOutputStream(new File(targetDirectory, - getResolvedTargetFileName() + ".teavmdbg"))) { + try (OutputStream debugInfoOut = new BufferedOutputStream(new FileOutputStream(new File(targetDirectory, + getResolvedTargetFileName() + ".teavmdbg")))) { debugInfo.write(debugInfoOut); } log.info("Debug information successfully written");