Last active
March 22, 2016 13:22
-
-
Save alexejVasko/d0bc93013fc29264ee53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class StringFileReader { | |
public static final String OUT_FILE_PATH = "./output.txt"; | |
public static String FileReader(){ | |
String fileLine = null; | |
BufferedReader reader = null; | |
try { | |
reader = new BufferedReader( | |
new FileReader(OUT_FILE_PATH)); | |
} catch (FileNotFoundException e) { | |
e.printStackTrace(); | |
} | |
try { | |
fileLine = reader.readLine(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
try { | |
reader.close(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
return fileLine; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment