|
Berkeley DB XML version 2.5.16 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.dbxml.XmlCompression
public class XmlCompression
XmlCompression is a base class for implementations of custom compression
for a container. Compression is only used by whole document storage containers.
To use customized compression the implementation must be registered with the
XmlManager using XmlManager.registerCompression(java.lang.String, com.sleepycat.dbxml.XmlCompression)
and the container must
be created by passing an XmlContainerConfig
object to
XmlManager.createContainer(java.lang.String)
that includes the name under which the
instance was registered (see XmlContainerConfig.setCompression(java.lang.String)
).
Compression is a persistent attribute of a container.
A container created with custom compression requires that the same named
compression instance be registered with the XmlManager
or any attempt to
open the container will fail.
XmlCompression
instances must be free-threaded and safe to use concurrently.
Constructor Summary | |
---|---|
XmlCompression()
|
Method Summary | |
---|---|
boolean |
compress(XmlTransaction txn,
XmlData source,
XmlData dest)
This method is called to compress the source into the destination. |
boolean |
decompress(XmlTransaction txn,
XmlData source,
XmlData dest)
This method is called to decompress the source into the destination. |
void |
delete()
Releases the native resources associated with this object, this method should be called from custom implement compression class when compression is done. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlCompression()
Method Detail |
---|
public void delete()
public boolean compress(XmlTransaction txn, XmlData source, XmlData dest) throws XmlException
txn
- The active transaction. It may be null.source
- An XmlData
object containing the content to be compressed.dest
- An XmlData
object for the resulting compressed content.
XmlException
public boolean decompress(XmlTransaction txn, XmlData source, XmlData dest) throws XmlException
txn
- The active transaction. It may be null.source
- An XmlData
object containing the compressed content.dest
- An XmlData
object for the resulting uncompressed content.
XmlException
|
Berkeley DB XML version 2.5.16 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |