org.apache.xindice.xml
Class XMLCompressedOutput
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.FilterOutputStream
|
+--java.io.DataOutputStream
|
+--org.apache.xindice.xml.XMLCompressedOutput
- All Implemented Interfaces:
- DataOutput
- Direct Known Subclasses:
- DOMCompressor
- public class XMLCompressedOutput
- extends DataOutputStream
XMLCompressedInput is an OutputStream extension that provides functions for
writing types to a Xindice Compressed XML Stream.
- Version:
- $Revision: 518751 $, $Date: 2007-03-15 16:53:00 -0400 (Thu, 15 Mar 2007) $
Method Summary |
protected int |
getSizeSize(int sizeType)
getSizeSize returns the size (in bytes) of the specified
size type. |
protected byte |
getSizeType(long length)
getSizeType returns the optimal size type for the specifed
length value. |
protected int |
writeSize(int size)
Writes the size to the output stream. |
protected int |
writeSize(int sizeType,
int size)
writeSize writes the size to the output stream based on the
specified sizeType. |
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 |
st
protected SymbolTable st
XMLCompressedOutput
public XMLCompressedOutput(OutputStream os,
SymbolTable st)
getSizeType
protected final byte getSizeType(long length)
- getSizeType returns the optimal size type for the specifed
length value.
- Parameters:
length
- The length to evaluate- Returns:
- The optimal size
- See Also:
Signatures
getSizeSize
protected final int getSizeSize(int sizeType)
- getSizeSize returns the size (in bytes) of the specified
size type.
- Parameters:
sizeType
- The size type- Returns:
- The size in bytes
- See Also:
Signatures
writeSize
protected final int writeSize(int size)
throws IOException
- Writes the size to the output stream. Size type is determined
based on the passed size value.
- Parameters:
size
- The size- Returns:
- The size in bytes written
- Throws:
IOException
- If the write failed- See Also:
Signatures
writeSize
protected final int writeSize(int sizeType,
int size)
throws IOException
- writeSize writes the size to the output stream based on the
specified sizeType.
- Parameters:
sizeType
- The size typesize
- The size- Returns:
- The size in bytes written
- Throws:
IOException
- If the write failed- See Also:
Signatures
Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.