X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Ftool%2FBundleTool.java;h=0b007d4fdcd65c39d7fba14a4fc019bc43b4afd3;hb=57f1c664b4ba65242919812edf5201a4ec9f3e28;hp=5286af8027b9de3d7b52c5d0c35d3d9454d41295;hpb=0d512e810fc3838b6787c2a866864481d79c93ca;p=mir.git diff --git a/source/tool/BundleTool.java b/source/tool/BundleTool.java index 5286af80..0b007d4f 100755 --- a/source/tool/BundleTool.java +++ b/source/tool/BundleTool.java @@ -30,6 +30,8 @@ package tool; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -49,7 +51,9 @@ public class BundleTool { PropertiesManipulator result; try { - master = PropertiesManipulator.readProperties(new FileInputStream(new File(aMaster))); + master = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aMaster)),8192)); } catch (Throwable t) { System.out.println("Unable to read master properties: " + t.getMessage()); @@ -57,7 +61,9 @@ public class BundleTool { } try { - slave = PropertiesManipulator.readProperties(new FileInputStream(new File(aSlave))); + slave = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aSlave)),8192)); } catch (FileNotFoundException t) { slave = new PropertiesManipulator(); @@ -116,7 +122,9 @@ public class BundleTool { PropertiesManipulator result; try { - master = PropertiesManipulator.readProperties(new FileInputStream(new File(aMaster))); + master = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aMaster)),8192)); } catch (Throwable t) { System.out.println("Unable to read master properties: " + t.getMessage()); @@ -124,7 +132,9 @@ public class BundleTool { } try { - slave = PropertiesManipulator.readProperties(new FileInputStream(new File(aSlave))); + slave = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aSlave)),8192)); } catch (FileNotFoundException t) { slave = new PropertiesManipulator(); @@ -178,7 +188,8 @@ public class BundleTool { } try { - PropertiesManipulator.writeProperties(result, new FileOutputStream(new File(aSlave))); + PropertiesManipulator.writeProperties(result, + new BufferedOutputStream(new FileOutputStream(new File(aSlave)),8192)); } catch (Throwable t) { System.out.println("Unable to write slave properties: " + t.getMessage()); @@ -190,9 +201,12 @@ public class BundleTool { PropertiesManipulator bundle; try { - bundle = PropertiesManipulator.readProperties(new FileInputStream(new File(aBundle))); + bundle = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aBundle)),8192)); - PropertiesManipulator.writeProperties(bundle, new FileOutputStream(anOutputFile), anEncoding, false); + PropertiesManipulator.writeProperties(bundle, + new BufferedOutputStream(new FileOutputStream(anOutputFile),8192), anEncoding, false); } catch (Throwable t) { System.out.println("Unable to read master properties: " + t.getMessage()); @@ -204,7 +218,9 @@ public class BundleTool { PropertiesManipulator bundle; try { - bundle = PropertiesManipulator.readProperties(new FileInputStream(new File(aSourceFile)), anEncoding); + bundle = PropertiesManipulator.readProperties( + new BufferedInputStream( + new FileInputStream(new File(aSourceFile)),8192), anEncoding); } catch (Throwable t) { Throwable s = ExceptionFunctions.traceCauseException(t); @@ -213,7 +229,8 @@ public class BundleTool { return; } try { - PropertiesManipulator.writeProperties(bundle, new FileOutputStream(aBundle)); + PropertiesManipulator.writeProperties(bundle, + new BufferedOutputStream(new FileOutputStream(aBundle),8192)); } catch (Throwable t) { System.out.println("Unable to write bundle: " + t.toString());