Java to Kotlin converter: added tests for 2 old issues
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user