How to read from a text file in Java

There are several ways to read a text file in Java. Here is one of them:

try {
	        FileInputStream stream = new FileInputStream(file);
	        InputStreamReader reader= new InputStreamReader(stream);
	        BufferedReader breader = new BufferedReader(reader);
	        String line = null;
	        while ((line = breader.readLine())!= null) {
	           processLine(line);
	        }
	    }
	    catch (FileNotFoundException ex) {
	        ex.printStackTrace();
	    } catch (IOException e) {
            e.printStackTrace();
        }