com.plumtree.openfoundation.util
Class XPPropertyBagXercesJ

java.lang.Object
  extended bycom.plumtree.openfoundation.util.XPPropertyBagXercesJ

public class XPPropertyBagXercesJ
extends java.lang.Object

Class that implements persistence of XPPropertyBag using XercesJ. Cannot use Singleton pattern because of in-use state and threading issues. XPPropertyBag instances instead should dispose of XPPropertyBagXercesJ immediately after use to avoid large memory use during a large portal crawl operation (issue #26142).


Nested Class Summary
static class XPPropertyBagXercesJ.LowASCIIFilterInputStream
          Armors entity references to low ASCII characters by promoting them into the private use range, to be later corrected when PropertyBag String fields are set.
 
Method Summary
 byte[] SaveToBinary(IXPPropertyBag pbag, int xmlFormat)
          Saves the given Property bag Serializes a DOM document from a property bag.
 void SaveToFile(IXPPropertyBag pbag, java.lang.String fileName)
          Saves the given Property bag Serializes a DOM document from a property bag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

SaveToBinary

public byte[] SaveToBinary(IXPPropertyBag pbag,
                           int xmlFormat)
Saves the given Property bag Serializes a DOM document from a property bag. The initial DOM document must be set up with a root element and its attributes. The DOM document is then traversed and returned as an xml byte array encoded in utf-8.

Parameters:
pbag - an instance of IXPPropertyBag.
xmlFormat - type of xmlFormat.
Returns:
xml byte array encoded in utf-8.

SaveToFile

public void SaveToFile(IXPPropertyBag pbag,
                       java.lang.String fileName)
Saves the given Property bag Serializes a DOM document from a property bag. The initial DOM document must be set up with a root element and its attributes. The DOM document is then traversed and returned as an xml byte array encoded in utf-8. Writes bytes from the specified byte array to this file output stream.

Parameters:
pbag - an instance of IXPPropertyBag.
fileName - to which byte array should be saved.


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.