Changeset 310 for trunk/JavaHelperLib/src/de/ugoe/cs/util
- Timestamp:
- 12/13/11 16:51:46 (13 years ago)
- Location:
- trunk/JavaHelperLib/src/de/ugoe/cs/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaHelperLib/src/de/ugoe/cs/util/FileTools.java
r175 r310 2 2 3 3 import java.io.File; 4 import java.io.FileInputStream; 4 5 import java.io.FileNotFoundException; 5 6 import java.io.FileReader; 6 7 import java.io.IOException; 8 import java.io.InputStreamReader; 9 import java.nio.charset.Charset; 7 10 8 11 /** … … 55 58 boolean carriageReturn) throws IOException, FileNotFoundException { 56 59 File f = new File(filename); 57 FileReader reader = new FileReader(f); 60 FileInputStream fis = new FileInputStream(f); 61 InputStreamReader reader = new InputStreamReader(fis, 62 Charset.defaultCharset()); 58 63 char[] buffer = new char[(int) f.length()]; 59 64 reader.read(buffer); -
trunk/JavaHelperLib/src/de/ugoe/cs/util/console/FileOutputListener.java
r250 r310 1 1 package de.ugoe.cs.util.console; 2 2 3 import java.io.FileOutputStream; 3 4 import java.io.FileWriter; 4 5 import java.io.IOException; 6 import java.io.OutputStreamWriter; 5 7 6 8 import de.ugoe.cs.util.console.listener.IOutputListener; … … 39 41 * </p> 40 42 */ 41 FileWriter writer = null;43 OutputStreamWriter writer = null; 42 44 43 45 /** … … 62 64 public void start() { 63 65 try { 64 writer = new FileWriter(filename); 66 FileOutputStream fos = new FileOutputStream(filename); 67 writer = new OutputStreamWriter(fos, "UTF-8"); 65 68 Console.getInstance().registerOutputListener(this); 66 69 } catch (IOException e) { -
trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java
r244 r310 2 2 3 3 import java.io.File; 4 import java.io.FileInputStream; 4 5 import java.io.FileNotFoundException; 5 6 import java.io.FileReader; 6 7 import java.io.IOException; 8 import java.io.InputStreamReader; 7 9 import java.security.InvalidParameterException; 8 10 import java.util.List; … … 38 40 String[] commands; 39 41 File f = new File(script); 40 FileReader reader = new FileReader(f); 42 FileInputStream fis = new FileInputStream(f); 43 InputStreamReader reader = new InputStreamReader(fis, "UTF-8"); 41 44 char[] buffer = new char[(int) f.length()]; 42 45 reader.read(buffer);
Note: See TracChangeset
for help on using the changeset viewer.