Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BufferedReader brp = null;
- String currentLine;
- try {
- brp = new BufferedReader(new FileReader(filePath));
- } catch (FileNotFoundException e) {
- System.out.println("Ne postoji fajl " + filePath);
- e.printStackTrace();
- }
- try {
- while ((currentLine = brp.readLine()) != null) {
- //U currentLine ti se nalazi to sto si ucitao, ceo line iz fajla
- }
- } catch (IOException e) {
- System.out.println("Greska pri ucitavanju iz tekstualne datoteke " + filePath);
- e.printStackTrace();
- }
- try {
- brp.close();
- } catch (IOException e) {
- System.out.println("Greska pri isključivanju čitača.");
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement