You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Rainer Klute <ra...@epost.de> on 2003/08/30 11:41:30 UTC

HPSF writing capability

Hi all,

I just commited the first shot of HPSF's writing functionality to the HEAD of POI's CVS repository. Now you can not only read a document's properties but you can also write them.

HPSF comes with three new classes: MutablePropertySet, MutableSection and MutableProperty extend their respective superclasses PropertySet, Section and Property with writing functionalities.

The drawback is that the current writing functionalities are very low-level. You have to deal with property IDs and variant types to write properties. There are no convenient classes and no convenient methods for dealing with summary information and document summary information streams yet. The API documentation tells you more about the details. You should also consider studying the HPSF testcases to see how to write property set streams.

The traditional HPSF classes have also undergone a few incompatible changes:

- When HPSF encounters a property type that it does not (yet) support, it writes a warning message to System.err. A warning is written only once for each unsupported type. You can turn off the warnings completely by calling org.apache.poi.hpsf.VariantSupport.setLogUnsupportedTypes(false). Unsupported type can still be read and written as byte arrays without any interpretation of the data.

- The Property methods getID() returns a long instead of an int now. The constructor Property(long, byte[], long, int, int) takes a long parameter where it formerly expected an int.

- The PropertySet methods getOSVersion() and getSectionCount() return a long instead of an int now.

Have fun!

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org