|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.poifs.eventfilesystem.POIFSReader
public class POIFSReader
An event-driven reader for POIFS file systems. Users of this class first create an instance of it, then use the registerListener methods to register POIFSReaderListener instances for specific documents. Once all the listeners have been registered, the read() method is called, which results in the listeners being notified as their documents are read.
Constructor Summary | |
---|---|
POIFSReader()
Create a POIFSReader |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
read in files |
void |
read(java.io.InputStream stream)
Read from an InputStream and process the documents we get |
void |
registerListener(POIFSReaderListener listener)
Register a POIFSReaderListener for all documents |
void |
registerListener(POIFSReaderListener listener,
POIFSDocumentPath path,
java.lang.String name)
Register a POIFSReaderListener for a document in the specified directory |
void |
registerListener(POIFSReaderListener listener,
java.lang.String name)
Register a POIFSReaderListener for a document in the root directory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POIFSReader()
Method Detail |
---|
public void read(java.io.InputStream stream) throws java.io.IOException
stream
- the InputStream from which to read the data
java.io.IOException
- on errors reading, or on invalid datapublic void registerListener(POIFSReaderListener listener)
listener
- the listener to be registered
java.lang.NullPointerException
- if listener is null
java.lang.IllegalStateException
- if read() has already been
calledpublic void registerListener(POIFSReaderListener listener, java.lang.String name)
listener
- the listener to be registeredname
- the document name
java.lang.NullPointerException
- if listener is null or name is
null or empty
java.lang.IllegalStateException
- if read() has already been
calledpublic void registerListener(POIFSReaderListener listener, POIFSDocumentPath path, java.lang.String name)
listener
- the listener to be registeredpath
- the document path; if null, the root directory is
assumedname
- the document name
java.lang.NullPointerException
- if listener is null or name is
null or empty
java.lang.IllegalStateException
- if read() has already been
calledpublic static void main(java.lang.String[] args) throws java.io.IOException
args
- names of the files
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |