Can I read lines of file between two concrete positions (not begin & and) using BufferedReader in Java? I know how to read all lines from file by this method, but I need to read only one fragment of file.
1 Answer
Yes you can
bufferedReader.skip(numberOfCharsToSkip);
See: http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html#skip%28long%29
1 Comment
Hovercraft Full Of Eels
@user2842269: by checking the line returned from the BufferedReader.
==or!=to compare Strings ever. Useequals(...)orequalsIgnoreCase(...)instead.