File tree 1 file changed +5
-7
lines changed
src/main/java/org/fusesource/jansi
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import static org .fusesource .jansi .Ansi .ansi ;
19
19
20
+ import java .io .BufferedReader ;
20
21
import java .io .Closeable ;
21
22
import java .io .File ;
22
23
import java .io .FileInputStream ;
@@ -199,14 +200,11 @@ private static String getPomPropertiesVersion(String path) throws IOException {
199
200
}
200
201
201
202
private static void printJansiLogoDemo () throws IOException {
202
- Reader in = new InputStreamReader (AnsiMain .class .getResourceAsStream ("jansi.txt" ), "UTF-8" );
203
+ BufferedReader in = new BufferedReader ( new InputStreamReader (AnsiMain .class .getResourceAsStream ("jansi.txt" ), "UTF-8" ) );
203
204
try {
204
- char [] buf = new char [1024 ];
205
- int l = 0 ;
206
- while ((l = in .read (buf )) >= 0 ) {
207
- for (int i = 0 ; i < l ; i ++) {
208
- System .out .print (buf [i ]);
209
- }
205
+ String l ;
206
+ while ((l = in .readLine ()) != null ) {
207
+ System .out .println (l );
210
208
}
211
209
} finally {
212
210
closeQuietly (in );
You can’t perform that action at this time.
0 commit comments