Xindice API
version 1.1

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) $

Field Summary
protected  SymbolTable st
           
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
XMLCompressedOutput(OutputStream os, SymbolTable st)
           
 
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.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Field Detail

st

protected SymbolTable st
Constructor Detail

XMLCompressedOutput

public XMLCompressedOutput(OutputStream os,
                           SymbolTable st)
Method Detail

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 type
size - The size
Returns:
The size in bytes written
Throws:
IOException - If the write failed
See Also:
Signatures

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.