This document describes how to use the POIFS APIs to read, write, and modify files that employ a POIFS-compatible data structure to organize their content.
- Revision History
-
-
02.10.2002 - completely rewritten from original documents on sourceforge
-
-
+
This document describes how to use the POIFS APIs to read, write,
+ and modify files that employ a POIFS-compatible data structure to
+ organize their content.
Target Audience
This document is intended for Java developers who need to use the POIFS APIs to read, write, or modify files that employ a POIFS-compatible data structure to organize their content. It is not necessary for developers to understand the POIFS data structures, and an explanation of those data structures is beyond the scope of this document. It is expected that the members of the target audience will understand the rudiments of a hierarchical file system, and familiarity with the event pattern employed by Java APIs such as AWT would be helpful.
@@ -87,7 +84,7 @@
Disadvantages
-
Conventional Reading
+
Conventional Reading (POIFSFileSystem)
Simpler API similar to reading a conventional file system.
Can read documents in any order.
@@ -96,6 +93,19 @@
All files are resident in memory, whether your application needs them or not.
+
+
New NIO driven Reading (NPOIFSFileSystem)
+
+ Simpler API similar to reading a conventional file system.
+ Can read documents in any order.
+ Lower memory than POIFSFileSystem
+
+
+ If created from an InputStream, all files are resident in memory.
+ (If created from a File, only certain key structures are)
+ Currently doesn't support writing
+
Once the file system has been loaded into memory and the root directory has been obtained, the root directory can be read. The following code fragment shows how to read the entries in an org.apache.poi.poifs.filesystem.DirectoryEntry instance: