Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- fis = new FileInputStream(fName);
- } catch (FileNotFoundException ex) {
- //...
- }
- DataInputStream myInput = new DataInputStream(fis);
- try {
- while (thisLine = myInput.readLine()) != null) {
- StringTokenizer st = new StringTokenizer(thisLine, ";");
- while (st.hasMoreElements()) {
- // do something with st.nextToken();
- }
- }
- } catch (Exception e) {
- //...
- }
- DataInputStream d = new DataInputStream(in);
- BufferedReader d
- = new BufferedReader(new InputStreamReader(in));
- BufferedReader br = new BufferedReader (new InputStreamReader (source, charset);
- while (br.readLine () != null) { ... }
- File myFile = ...
- List<String> lines = FileUtils.readLines(myFile, "UTF-8");
- for (String line : lines) {
- StringTokenizer st = new StringTokenizer(line, ";");
- while (st.hasMoreElements()) {
- // do something with st.nextToken();
- }
- }
Add Comment
Please, Sign In to add comment