org.apache.poi.hssf.eventmodel
Class EventRecordFactory

java.lang.Object
  extended by org.apache.poi.hssf.eventmodel.EventRecordFactory

public final class EventRecordFactory
extends java.lang.Object

Event-based record factory. As opposed to RecordFactory this version sends ERFListener.processRecord(Record) messages to the supplied listener. Record notifications are sent one record behind to ensure that ContinueRecords are processed first.

Author:
Andrew C. Oliver (acoliver@apache.org) - probably to blame for the bugs (so yank his chain on the list), Marc Johnson (mjohnson at apache dot org) - methods taken from RecordFactory, Glen Stampoultzis (glens at apache.org) - methods taken from RecordFactory, Csaba Nagy (ncsaba at yahoo dot com)

Constructor Summary
EventRecordFactory(ERFListener listener, short[] sids)
           
 
Method Summary
 void processRecords(java.io.InputStream in)
          Create an array of records from an input stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventRecordFactory

public EventRecordFactory(ERFListener listener,
                          short[] sids)
Parameters:
sids - an array of Record.sid values identifying the records the listener will work with. Alternatively if this is "null" then all records are passed. For all 'known' record types use RecordFactory.getAllKnownRecordSIDs()
Method Detail

processRecords

public void processRecords(java.io.InputStream in)
                    throws RecordFormatException
Create an array of records from an input stream

Parameters:
in - the InputStream from which the records will be obtained
Throws:
RecordFormatException - on error processing the InputStream


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.