Java to Kotlin converter: added tests for 2 old issues

This commit is contained in:
Valentin Kipyatkov
2014-07-11 12:36:22 +04:00
parent 276d1dcf14
commit 08d7b64160
5 changed files with 63 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
//file
import java.io.*;
class FileRead {
public static void main(String args[]) {
try {
FileInputStream fstream = new FileInputStream("textfile.txt");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while ((strLine = br.readLine()) != null) { System.out.println (strLine); }
in.close();
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}