Changeset 312
- Timestamp:
- 12/14/11 11:56:20 (13 years ago)
- Location:
- trunk/JavaHelperLib/src/de/ugoe/cs/util/console
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaHelperLib/src/de/ugoe/cs/util/console/FileOutputListener.java
r310 r312 2 2 3 3 import java.io.FileOutputStream; 4 import java.io.FileWriter;5 4 import java.io.IOException; 6 5 import java.io.OutputStreamWriter; -
trunk/JavaHelperLib/src/de/ugoe/cs/util/console/TextConsole.java
r250 r312 2 2 3 3 import java.io.IOException; 4 import java.nio.charset.Charset; 4 5 5 6 import de.ugoe.cs.util.console.listener.IErrorListener; … … 119 120 protected String getCommand() { 120 121 byte[] buffer = new byte[1024]; 122 int bytesRead = 0; 123 String command; 121 124 try { 122 System.in.read(buffer);125 bytesRead = System.in.read(buffer); 123 126 } catch (IOException e) { 124 127 125 128 } 126 return new String(buffer); 129 if (bytesRead == 0) { 130 command = ""; 131 } else { 132 command = new String(buffer, Charset.defaultCharset()); 133 } 134 return command; 127 135 } 128 136 129 137 /** 130 138 * <p> 131 139 * Configures if the debug mode of the text console is enabled. 132 140 * </p> 133 * @param debug if true, debug mode is enabled. 141 * 142 * @param debug 143 * if true, debug mode is enabled. 134 144 */ 135 145 public void setDebug(boolean debug) { -
trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java
r310 r312 4 4 import java.io.FileInputStream; 5 5 import java.io.FileNotFoundException; 6 import java.io.FileReader;7 6 import java.io.IOException; 8 7 import java.io.InputStreamReader;
Note: See TracChangeset
for help on using the changeset viewer.