Read Lines between a start index and end index in java
- by HonorGod
Lets say I have 10 lines in a file. I have 2 parameters that specify the beginning and ending of a index.
StartIndex = 2 // specifies the first 2 lines
EndIndex = 3 // specifies the last 3 lines
I need to read the lines in between. I know maintaining index and skipping is one of the ways...but are there any other efficient ways (even with external libraries)?
Thanks