| Modifier and Type | Class and Description |
|---|---|
static class |
BigLines.LineReader |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BigLines.LineReader lineReader) |
List<String> |
cherrypick(int[] index) |
String |
fetch(int lineNumber)
Returns the line specified by
lineNumber. |
List<String> |
fetch(int offset,
int limit)
Returns a number of lines specified by start position
offset and limit. |
List<String> |
fetchAround(int lineNumber,
int before,
int after) |
String |
firstLine() |
String |
getName() |
boolean |
isEmpty() |
Iterator<String> |
iterator() |
int |
lines() |
static void |
main(String[] args) |
List<String> |
preview()
Returns first 5 lines including header line.
|
List<String> |
preview(int limit)
Returns first
limit lines including header line. |
List<String> |
preview(int limit,
boolean noHeaderLine)
Returns first
limit lines. |
List<String> |
sampling(int number) |
void |
setIterateFirstLine(boolean flag) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic BigLines(File file)
public String getName()
public boolean isEmpty()
public String firstLine()
public int lines()
public void setIterateFirstLine(boolean flag)
public List<String> preview(int limit)
Returns first limit lines including header line.
limit - the number of lines to be returnedlimit linespublic List<String> preview(int limit, boolean noHeaderLine)
Returns first limit lines.
limit - the number of lines to be returnednoHeaderLine - if false then header line will be excluded in the return listlimit lines.public String fetch(int lineNumber)
Returns the line specified by lineNumber.
Note the lineNumber starts with 0.
lineNumber - specify the line to be returned.public List<String> fetch(int offset, int limit)
Returns a number of lines specified by start position offset and limit.
offset - the start line number (0 based)limit - the number of lines to be returned.public void accept(BigLines.LineReader lineReader)
public static void main(String[] args)
Copyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.