public static class StreamingReader.Builder extends Object
| Constructor and Description |
|---|
StreamingReader.Builder() |
| Modifier and Type | Method and Description |
|---|---|
StreamingReader.Builder |
bufferSize(int bufferSize)
The number of bytes to read into memory from the input
resource.
|
StreamingReader |
read(File f)
Reads a given
File and returns a new instance
of StreamingReader. |
StreamingReader |
read(InputStream is)
Reads a given
InputStream and returns a new
instance of StreamingReader. |
StreamingReader.Builder |
rowCacheSize(int rowCacheSize)
The number of rows to keep in memory at any given point.
|
StreamingReader.Builder |
sheetIndex(int sheetIndex)
Which sheet to open.
|
StreamingReader.Builder |
sheetName(String sheetName)
Which sheet to open.
|
public StreamingReader.Builder rowCacheSize(int rowCacheSize)
Defaults to 10
rowCacheSize - number of rowsBuilderpublic StreamingReader.Builder bufferSize(int bufferSize)
Defaults to 1024
bufferSize - buffer size in bytesBuilderpublic StreamingReader.Builder sheetIndex(int sheetIndex)
StreamingReader. If
more sheets need to be read, a new instance must be
created.
Defaults to 0
sheetIndex - index of sheetBuilderpublic StreamingReader.Builder sheetName(String sheetName)
StreamingReader. If
more sheets need to be read, a new instance must be
created.sheetName - name of sheetBuilderpublic StreamingReader read(InputStream is)
InputStream and returns a new
instance of StreamingReader. Due to Apache POI
limitations, a temporary file must be written in order
to create a streaming iterator. This process will use
the same buffer size as specified in bufferSize(int).is - input stream to read incom.monitorjbl.xlsx.exceptions.ReadException - if there is an issue reading the streampublic StreamingReader read(File f)
File and returns a new instance
of StreamingReader.f - file to read incom.monitorjbl.xlsx.exceptions.OpenException - if there is an issue opening the filecom.monitorjbl.xlsx.exceptions.ReadException - if there is an issue reading the fileCopyright © 2015. All rights reserved.