user2842269
user2842269

Reputation: 27

Reading lines from file using BufferedReader

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.

Upvotes: 0

Views: 108

Answers (1)

Johan
Johan

Reputation: 76753

Yes you can

bufferedReader.skip(numberOfCharsToSkip);

See: http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html#skip%28long%29

Upvotes: 1

Related Questions