Package com.github.pjfanning.xlsx
Class StreamingReader
- java.lang.Object
-
- com.github.pjfanning.xlsx.StreamingReader
-
- All Implemented Interfaces:
AutoCloseable
,Iterable<org.apache.poi.ss.usermodel.Row>
public class StreamingReader extends Object implements Iterable<org.apache.poi.ss.usermodel.Row>, AutoCloseable
Streaming Excel workbook implementation. Most advanced features of POI are not supported. Use this only if your application can handle iterating through an entire workbook, row by row.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamingReader.Builder
-
Constructor Summary
Constructors Constructor Description StreamingReader(StreamingWorkbookReader workbook)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StreamingReader.Builder
builder()
void
close()
Closes the streaming resource, attempting to clean up any temporary files created.Iterator<org.apache.poi.ss.usermodel.Row>
iterator()
Deprecated.StreamingReader is equivalent to the POI Workbook object rather than the Sheet object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
StreamingReader
public StreamingReader(StreamingWorkbookReader workbook)
-
-
Method Detail
-
iterator
public Iterator<org.apache.poi.ss.usermodel.Row> iterator()
Deprecated.StreamingReader is equivalent to the POI Workbook object rather than the Sheet object. This method will be removed in a future release.Returns a new streaming iterator to loop through rows. This iterator is not guaranteed to have all rows in memory, and any particular iteration may trigger a load from disk to read in new data.
-
close
public void close() throws IOException
Closes the streaming resource, attempting to clean up any temporary files created.- Specified by:
close
in interfaceAutoCloseable
- Throws:
CloseException
- if there is an issue closing the streamIOException
-
builder
public static StreamingReader.Builder builder()
-
-