org.apache.tika.parser.chm.lzx
Class ChmLzxBlock

java.lang.Object
  extended by org.apache.tika.parser.chm.lzx.ChmLzxBlock

public class ChmLzxBlock
extends java.lang.Object

Decompresses a chm block. Depending on chm block type chooses most relevant decompressing method. A chm block type can be as follows:

  • UNDEFINED - no action taken, i.e. skipping the block
  • VERBATIM
  • ALIGNED_OFFSET
  • UNCOMPRESSED the most simplest In addition there are unknown types (4-7). Currently relying on previous chm block these types changing according to the previous chm block type. We need to invent more appropriate way to handle such types.


    Constructor Summary
    ChmLzxBlock(int blockNumber, byte[] dataSegment, long blockLength, ChmLzxBlock prevBlock)
               
     
    Method Summary
     void decompressAlignedBlock(int len, byte[] prevcontent)
               
     void decompressUncompressedBlock(int len, byte[] prevcontent)
               
     int getBlockNumber()
               
     byte[] getContent()
               
     byte[] getContent(int start)
               
     byte[] getContent(int startOffset, int endOffset)
               
    protected  int getContentLength()
               
     ChmLzxState getState()
               
    protected  void intelE8Decoding()
               
    static void main(java.lang.String[] args)
               
    protected  void setContentLength(int contentLength)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    ChmLzxBlock

    public ChmLzxBlock(int blockNumber,
                       byte[] dataSegment,
                       long blockLength,
                       ChmLzxBlock prevBlock)
    Method Detail

    getContentLength

    protected int getContentLength()

    setContentLength

    protected void setContentLength(int contentLength)

    intelE8Decoding

    protected void intelE8Decoding()

    decompressUncompressedBlock

    public void decompressUncompressedBlock(int len,
                                            byte[] prevcontent)

    decompressAlignedBlock

    public void decompressAlignedBlock(int len,
                                       byte[] prevcontent)
                                throws TikaException
    Throws:
    TikaException

    getContent

    public byte[] getContent()

    getContent

    public byte[] getContent(int startOffset,
                             int endOffset)

    getContent

    public byte[] getContent(int start)

    getBlockNumber

    public int getBlockNumber()

    getState

    public ChmLzxState getState()

    main

    public static void main(java.lang.String[] args)
    Parameters:
    args -


    Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.