org.apache.xindice.xml.dom
Class DOMCompressor
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.FilterOutputStream
|
+--java.io.DataOutputStream
|
+--org.apache.xindice.xml.XMLCompressedOutput
|
+--org.apache.xindice.xml.dom.DOMCompressor
- All Implemented Interfaces:
- DataOutput
- public final class DOMCompressor
- extends XMLCompressedOutput
DOMCompressor is an OutputStream extension that provides functions for
writing DOM types to a Xindice Compressed XML Stream.
- Version:
- $Revision: 518751 $, $Date: 2007-03-15 16:53:00 -0400 (Thu, 15 Mar 2007) $
Method Summary |
static byte[] |
compress(org.w3c.dom.Node node,
SymbolTable symbols)
Compress is a convenience method that compresses a Node into a byte
array with a single call. |
static byte[] |
Compress(org.w3c.dom.Node node,
SymbolTable symbols)
Deprecated. renamed to compress(Node, SymbolTable) . |
void |
writeNode(org.w3c.dom.Node node)
writeNode writes a Node to the compressed output stream. |
Methods inherited from class java.io.DataOutputStream |
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMCompressor
public DOMCompressor(OutputStream os,
SymbolTable st)
writeNode
public void writeNode(org.w3c.dom.Node node)
throws IOException
- writeNode writes a Node to the compressed output stream. This method
is recursive and will write all children of the specific Node.
- Parameters:
node
- The Node to write- Throws:
IOException
- If the write failed
Compress
public static byte[] Compress(org.w3c.dom.Node node,
SymbolTable symbols)
- Deprecated. renamed to
compress(Node, SymbolTable)
.
- Compress is a convenience method that compresses a Node into a byte
array with a single call.
- Parameters:
node
- The Node to compresssymbols
- The Symbol Table to use- Returns:
- The resulting byte array
compress
public static byte[] compress(org.w3c.dom.Node node,
SymbolTable symbols)
- Compress is a convenience method that compresses a Node into a byte
array with a single call.
- Parameters:
node
- The Node to compresssymbols
- The Symbol Table to use- Returns:
- The resulting byte array
Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.