Package loci.poi.hssf.eventusermodel
Class HSSFEventFactory
java.lang.Object
loci.poi.hssf.eventusermodel.HSSFEventFactory
Low level event based HSSF reader. Pass either a DocumentInputStream to
process events along with a request object or pass a POIFS POIFSFileSystem to
processWorkbookEvents along with a request.
This will cause your file to be processed a record at a time. Each record with
a static id matching one that you have registed in your HSSFRequest will be passed
to your associated HSSFListener.
- Author:
- Andrew C. Oliver (acoliver at apache dot org), Carey Sublette (careysub@earthling.net)
- See Also:
-
loci.poi.hssf.dev.EFHSSF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortabortableProcessEvents(HSSFRequest req, InputStream in) Processes a DocumentInputStream into essentially Record events.shortProcesses a file into essentially record events.protected shortProcesses a DocumentInputStream into essentially Record events.voidprocessEvents(HSSFRequest req, InputStream in) Processes a DocumentInputStream into essentially Record events.voidProcesses a file into essentially record events.
-
Constructor Details
-
HSSFEventFactory
public HSSFEventFactory()Creates a new instance of HSSFEventFactory
-
-
Method Details
-
processWorkbookEvents
Processes a file into essentially record events.- Parameters:
req- an Instance of HSSFRequest which has your registered listenersfs- a POIFS filesystem containing your workbook- Throws:
IOException
-
abortableProcessWorkbookEvents
public short abortableProcessWorkbookEvents(HSSFRequest req, POIFSFileSystem fs) throws IOException, HSSFUserException Processes a file into essentially record events.- Parameters:
req- an Instance of HSSFRequest which has your registered listenersfs- a POIFS filesystem containing your workbook- Returns:
- numeric user-specified result code.
- Throws:
IOExceptionHSSFUserException
-
processEvents
Processes a DocumentInputStream into essentially Record events. If anAbortableHSSFListenercauses a halt to processing during this call the method will return just as withabortableProcessEvents, but no user code orHSSFUserExceptionwill be passed back.- Parameters:
req- an Instance of HSSFRequest which has your registered listenersin- a DocumentInputStream obtained from POIFS's POIFSFileSystem object- Throws:
IOException- See Also:
-
abortableProcessEvents
public short abortableProcessEvents(HSSFRequest req, InputStream in) throws IOException, HSSFUserException Processes a DocumentInputStream into essentially Record events.- Parameters:
req- an Instance of HSSFRequest which has your registered listenersin- a DocumentInputStream obtained from POIFS's POIFSFileSystem object- Returns:
- numeric user-specified result code.
- Throws:
IOExceptionHSSFUserException- See Also:
-
genericProcessEvents
protected short genericProcessEvents(HSSFRequest req, RecordInputStream in) throws IOException, HSSFUserException Processes a DocumentInputStream into essentially Record events.- Parameters:
req- an Instance of HSSFRequest which has your registered listenersin- a DocumentInputStream obtained from POIFS's POIFSFileSystem object- Returns:
- numeric user-specified result code.
- Throws:
IOExceptionHSSFUserException- See Also:
-