intarsys PDF library API

de.intarsys.pdf.filter
Class LZWDecoder

java.lang.Object
  extended by de.intarsys.pdf.filter.LZWDecoder

public class LZWDecoder
extends Object

A class for performing LZW decoding.


Constructor Summary
LZWDecoder()
           
 
Method Summary
 void addStringToTable(byte[] string)
          Add a new string to the string table.
 void addStringToTable(byte[] oldString, byte newString)
          Add a new string to the string table.
 byte[] composeString(byte[] oldString, byte newString)
          Append newString to the end of oldString.
 byte[] decode(byte[] data)
          Method to decode LZW compressed data.
 int getNextCode(byte[] data)
           
 void initializeStringTable()
          Initialize the string table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LZWDecoder

public LZWDecoder()
Method Detail

getNextCode

public int getNextCode(byte[] data)

addStringToTable

public void addStringToTable(byte[] oldString,
                             byte newString)
Add a new string to the string table.

Parameters:
oldString -
newString -

addStringToTable

public void addStringToTable(byte[] string)
Add a new string to the string table.

Parameters:
string -

composeString

public byte[] composeString(byte[] oldString,
                            byte newString)
Append newString to the end of oldString.

Parameters:
oldString -
newString -

decode

public byte[] decode(byte[] data)
              throws IOException
Method to decode LZW compressed data.

Parameters:
data - The compressed data.
Throws:
IOException

initializeStringTable

public void initializeStringTable()
Initialize the string table.


intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.