always use buffered output streams when writing to a file, faster swf xml export by caching the fields

This commit is contained in:
2015-05-01 01:04:08 +02:00
parent 1429757552
commit fce4534aed
18 changed files with 78 additions and 34 deletions
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.gui;
import com.jpexs.helpers.utf8.Utf8Helper;
import com.jpexs.helpers.utf8.Utf8PrintWriter;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -25,6 +26,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -137,7 +139,7 @@ public class LicenseUpdater {
} catch (IOException ex) {
}
try (FileOutputStream fos = new FileOutputStream(f)) {
try (OutputStream fos = new BufferedOutputStream(new FileOutputStream(f))) {
fos.write(baos.toByteArray());
} catch (IOException ex) {
}