Package Name | Comment |
org.apache.poi | |
org.apache.poi.contrib.metrics | |
org.apache.poi.contrib.poibrowser |
The POI Browser is a very simple Swing GUI tool that
displays the internal structure of a Microsoft Office file. It concentrates
on streams in the Horrible Property Set Format (HPSF). In order to
access these streams the POI Browser uses the package
org.apache.poi.hpsf.
A file in Microsoft's Office format can be seen as a filesystem within a
file. For example, a Word document like sample.doc is just a
simple file from the operation system's point of view. However, internally
it is organized into various directories and files. For example,
sample.doc might consist of the three internal files (or
"streams", as Microsoft calls them) \001CompObj,
\005SummaryInformation, and WordDocument. (In these names
\001 and \005 denote the unprintable characters with the character codes 1
and 5, respectively.) A more complicated Word file typically contains a
directory named ObjectPool with more directories and files nested
within it.
The POI Browser makes these internal structures visible. It takes one or
more Microsoft files as input on the command line and shows directories and
files in a tree-like structure. On the top-level POI Browser displays the
(operating system) filenames. An internal file (i.e. a "stream" or a
"document") is shown with its name, its size and a hexadecimal dump of its
first bytes.
Property Set Streams
The POI Browser pays special attention to property set streams. For
example, the \005SummaryInformation stream contains information
like title and author of the document. The POI Browser opens every stream
in a POI filesystem. If it encounters a property set stream, it displays
not just its first bytes but analyses the whole stream and displays its
contents in a more or less readable manner.
Running POI Browser
Running the POI Browser requires you to start a Java Virtual Machine
(JVM) and to set up a valid classpath so that the JVM can find all the Java
classes it needs. These are the main POI classes and the "contrib" POI
classes.
The following instructions assume that you have set up your Java
enviromnent variables properly, i.e. the variable JAVA_HOME contains the
name of your Java installation directory and the variable PATH includes the
bin subdirectory of the Java installation directory. At the time
of this writing the current POI version was 2.5.1-final dating from August
4th, 2004. The example statements reflect version numbering and
date. Change the commands accordingly if you are running the POI Browser of
a later or earlier than this!
Running POI Browser on Unix
Suppose you have unpacked the POI 2.5.1 release in the
/opt/local/poi directory of your Unix box. Then the following
command starts the POI Browser and displays the structure of the files
MyWord.doc, MyExcel.xls and
MyPowerpoint.ppt:
java -classpath /opt/local/poi/poi-2.5.1-final-20040804.jar:/opt/local/poi/poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt
Running POI Browser on Windows
Suppose you have unpacked the POI 2.5.1 release in the
C:\Programs\POI directory of your Windows box. Then the following
command starts the POI Browser and displays the structure of the files
MyWord.doc, MyExcel.xls and
MyPowerpoint.ppt:
java -classpath C:\Programs\POI\poi-2.5.1-final-20040804.jar;C:\Programs\POI\poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt
|
org.apache.poi.ddf |
This package contains classes for decoding the Microsoft Office
Drawing format otherwise known as escher henceforth known in POI
as the Dreadful Drawing Format.
|
org.apache.poi.dev | |
org.apache.poi.generator | |
org.apache.poi.hdf.event | |
org.apache.poi.hdf.extractor | |
org.apache.poi.hdf.extractor.data | |
org.apache.poi.hdf.extractor.util | |
org.apache.poi.hdf.generator | |
org.apache.poi.hdf.model | |
org.apache.poi.hdf.model.hdftypes | |
org.apache.poi.hdf.model.hdftypes.definitions | |
org.apache.poi.hdf.model.util | |
org.apache.poi.hdgf | |
org.apache.poi.hdgf.chunks | |
org.apache.poi.hdgf.dev | |
org.apache.poi.hdgf.exceptions | |
org.apache.poi.hdgf.extractor | |
org.apache.poi.hdgf.pointers | |
org.apache.poi.hdgf.streams | |
org.apache.poi.hpsf |
HPSF
Processes streams in the Horrible Property Set Format (HPSF) in POI
filesystems. Microsoft Office documents, i.e. POI filesystems, usually
contain meta data like author, title, last saving time etc. These items
are called properties and stored in
property set streams along with the document itself. These
streams are commonly named \005SummaryInformation and
\005DocumentSummaryInformation. However, a POI filesystem may
contain further property sets of other names or types.
In order to extract the properties from a POI filesystem, a property set
stream's contents must be parsed into a {@link
org.apache.poi.hpsf.PropertySet} instance. Its subclasses {@link
org.apache.poi.hpsf.SummaryInformation} and {@link
org.apache.poi.hpsf.DocumentSummaryInformation} deal with the well-known
property set streams \005SummaryInformation and
\005DocumentSummaryInformation. (However, the streams' names are
irrelevant. What counts is the property set's first section's format ID -
see below.)
The factory method {@link org.apache.poi.hpsf.PropertySetFactory#create}
creates a {@link org.apache.poi.hpsf.PropertySet} instance. This method
always returns the most specific property set: If it
identifies the stream data as a Summary Information or as a Document
Summary Information it returns an instance of the corresponding class, else
the general {@link org.apache.poi.hpsf.PropertySet}.
A {@link org.apache.poi.hpsf.PropertySet} contains a list of {@link
org.apache.poi.hpsf.Section}s which can be retrieved with {@link
org.apache.poi.hpsf.PropertySet#getSections}. Each {@link
org.apache.poi.hpsf.Section} contains a {@link
org.apache.poi.hpsf.Property} array which can be retrieved with {@link
org.apache.poi.hpsf.Section#getProperties}. Since the vast majority of
{@link org.apache.poi.hpsf.PropertySet}s contains only a single {@link
org.apache.poi.hpsf.Section}, the convenience method {@link
org.apache.poi.hpsf.PropertySet#getProperties} returns the properties of a
{@link org.apache.poi.hpsf.PropertySet}'s {@link
org.apache.poi.hpsf.Section} (throwing a {@link
org.apache.poi.hpsf.NoSingleSectionException} if the {@link
org.apache.poi.hpsf.PropertySet} contains more (or less) than exactly one
{@link org.apache.poi.hpsf.Section}).
Each {@link org.apache.poi.hpsf.Property} has an ID, a
type, and a value which can be retrieved
with {@link org.apache.poi.hpsf.Property#getID}, {@link
org.apache.poi.hpsf.Property#getType}, and {@link
org.apache.poi.hpsf.Property#getValue}, respectively. The value's class
depends on the property's type. The current implementation
does not yet support all property types and restricts the values' classes
to {@link java.lang.String}, {@link java.lang.Integer} and {@link
java.util.Date}. A value of a yet unknown type is returned as a byte array
containing the value's origin bytes from the property set stream.
To retrieve the value of a specific {@link org.apache.poi.hpsf.Property},
use {@link org.apache.poi.hpsf.Section#getProperty} or {@link
org.apache.poi.hpsf.Section#getPropertyIntValue}.
The {@link org.apache.poi.hpsf.SummaryInformation} and {@link
org.apache.poi.hpsf.DocumentSummaryInformation} classes provide convenience
methods for retrieving well-known properties. For example, an application
that wants to retrieve a document's title string just calls {@link
org.apache.poi.hpsf.SummaryInformation#getTitle} instead of going through
the hassle of first finding out what the title's property ID is and then
using this ID to get the property's value.
Writing properties can be done with the classes
{@link org.apache.poi.hpsf.MutablePropertySet}, {@link
org.apache.poi.hpsf.MutableSection}, and {@link
org.apache.poi.hpsf.MutableProperty}.
Public documentation from Microsoft can be found in the appropriate section of the MSDN Library.
History
- 2003-09-11:
-
{@link org.apache.poi.hpsf.PropertySetFactory#create(InputStream)} no
longer throws an
{@link org.apache.poi.hpsf.UnexpectedPropertySetTypeException}.
To Do
The following is still left to be implemented. Sponsering could foster
these issues considerably.
@author Rainer Klute (klute@rainer-klute.de)
@version $Id: package.html 496526 2007-01-15 22:46:35Z markt $
@since 2002-02-09
|
org.apache.poi.hpsf.basic | |
org.apache.poi.hpsf.examples | |
org.apache.poi.hpsf.wellknown |
Specific support for DocumentSummaryInformation, SummaryInformation types.
Support classes for "well-known" section format IDs and property IDs. The
streams \005DocumentSummaryInformation and
\005SummaryInformation (or any streams with the same section
format IDs as the aforementioned) are considered well-known. So are most
property IDs in these streams.
@author Rainer Klute (klute@rainer-klute.de)
@version $Id: package.html 496526 2007-01-15 22:46:35Z markt $
@since 2002-02-09
|
org.apache.poi.hslf | |
org.apache.poi.hslf.blip | |
org.apache.poi.hslf.dev | |
org.apache.poi.hslf.examples | |
org.apache.poi.hslf.exceptions | |
org.apache.poi.hslf.extractor | |
org.apache.poi.hslf.model | |
org.apache.poi.hslf.model.textproperties | |
org.apache.poi.hslf.record | |
org.apache.poi.hslf.usermodel | |
org.apache.poi.hslf.util | |
org.apache.poi.hsmf | |
org.apache.poi.hsmf.datatypes | |
org.apache.poi.hsmf.exceptions | |
org.apache.poi.hsmf.model | |
org.apache.poi.hsmf.parsers | |
org.apache.poi.hssf | |
org.apache.poi.hssf.contrib.view | |
org.apache.poi.hssf.dev |
DEV package serves two purposes. 1. Examples for how to use HSSF and 2. tools for developing
and validating HSSF.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.hssf.eventmodel | |
org.apache.poi.hssf.eventusermodel |
HSSF eventmodel Package provides an event-based API for reading HSSF files.
Related Documentation
The event model can reald XLS files with a very small memory footprint. For
writing you still have to use the usermodel. The eventmodel is to the usermodel
what SAX is to DOM.
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.hssf.usermodel
@see org.apache.poi.hssf.record
|
org.apache.poi.hssf.eventusermodel.dummyrecord | |
org.apache.poi.hssf.eventusermodel.examples | |
org.apache.poi.hssf.extractor | |
org.apache.poi.hssf.model |
Provides low level API structures for reading, writing, modifying XLS files.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.hssf.usermodel
|
org.apache.poi.hssf.record |
Record package contains class representations for XLS binary strutures. Its very
low level.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.hssf.eventmodel
@see org.apache.poi.hssf.record.RecordFactory
|
org.apache.poi.hssf.record.aggregates |
record aggregates are not real "records" but collections of records that act as a single record.
This is an optimization basically.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.hssf.record
@see org.apache.poi.hssf.eventmodel
@see org.apache.poi.hssf.record.RecordFactory
|
org.apache.poi.hssf.record.formula |
formula package contains binary PTG structures used in Formulas
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.hssf.record
@see org.apache.poi.hssf.record.FormulaRecord
|
org.apache.poi.hssf.record.formula.eval | |
org.apache.poi.hssf.record.formula.functions | |
org.apache.poi.hssf.usermodel |
usermodel package maps HSSF low level strutures to familiar workbook/sheet model
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.hssf.usermodel.contrib | |
org.apache.poi.hssf.usermodel.examples | |
org.apache.poi.hssf.util |
util package contains tools needed for writing HSSF files that are not necesarily "real"
HSSF concepts.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.hwpf | |
org.apache.poi.hwpf.extractor | |
org.apache.poi.hwpf.model | |
org.apache.poi.hwpf.model.io | |
org.apache.poi.hwpf.model.types | |
org.apache.poi.hwpf.sprm | |
org.apache.poi.hwpf.usermodel | |
org.apache.poi.poifs.common |
common package contains constants and other classes shared across all POIFS subpackages
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.poifs.dev |
DEV package serves two purposes. 1. Examples for how to use POIFS and 2. tools for developing
and validating POIFS.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.poifs.eventfilesystem |
The eventfilesystem is an efficient method for reading OLE 2 CDF files. It is to OLE 2 CDF what SAX is to XML.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.poifs.filesystem
|
org.apache.poi.poifs.filesystem |
filesystem package maps OLE 2 Compound document files to a more familiar filesystem interface.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.poifs.eventfilesystem
|
org.apache.poi.poifs.property |
property package contains high and low level Property structures for POIFS.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@see org.apache.poi.poifs.filesystem
|
org.apache.poi.poifs.storage |
storage package contains low level binary structures for POIFS's implementation of the OLE 2
Compound Document Format.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
org.apache.poi.util |
Top-level util package are classes that are useful throughout the project. These classes are
generally generic enough to be useful in any project and should be contributed elsewhere!
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
|