Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.internal.image
Class LZWCodec  view LZWCodec download LZWCodec.java

java.lang.Object
  extended byorg.eclipse.swt.internal.image.LZWCodec

final class LZWCodec
extends java.lang.Object


Field Summary
(package private)  int bitsLeft
           
(package private)  int bitsPerPixel
           
(package private)  byte[] block
           
(package private)  int blockIndex
           
(package private)  int blockSize
           
(package private)  int buffer
           
(package private)  int clearCode
           
(package private)  int codeMask
           
(package private)  int codeSize
           
(package private)  int currentByte
           
(package private)  int currentSlot
           
(package private)  int endCode
           
(package private)  org.eclipse.swt.graphics.ImageData image
           
(package private)  int imageHeight
           
(package private)  int imageWidth
           
(package private)  int imageX
           
(package private)  int imageY
           
(package private)  LEDataInputStream inputStream
           
(package private)  boolean interlaced
           
(package private)  int line
           
(package private)  byte[] lineArray
           
(package private)  org.eclipse.swt.graphics.ImageLoader loader
           
(package private) static int[] MASK_TABLE
           
(package private)  int newCodes
           
(package private)  LZWNode[] nodeStack
           
(package private)  LEDataOutputStream outputStream
           
(package private)  int pass
           
(package private)  int[] prefix
           
(package private)  int[] stack
           
(package private)  int[] suffix
           
(package private)  int topSlot
           
 
Constructor Summary
(package private) LZWCodec()
           
 
Method Summary
(package private)  void copyRow(byte[] buf, int copies)
          Copy duplicate rows of pixel values to the image.
(package private)  void decode()
          Decode the input.
 void decode(LEDataInputStream inputStream, org.eclipse.swt.graphics.ImageLoader loader, org.eclipse.swt.graphics.ImageData image, boolean interlaced, int depth)
          Decode the LZW-encoded bytes in the given byte stream into the given DeviceIndependentImage.
(package private)  void encode()
          Encode the image.
 void encode(LEDataOutputStream byteStream, org.eclipse.swt.graphics.ImageData image)
          Encode the bytes into the given byte stream from the given DeviceIndependentImage.
(package private)  int encodeLoop()
          Encoding loop broken out to allow early return.
(package private)  void initializeForDecoding()
          Initialize the receiver for decoding the given byte array.
(package private)  void initializeForEncoding()
          Initialize the receiver for encoding the given byte array.
(package private)  int nextCode()
          Answer the next code from the input byte array.
(package private)  int nextPixel()
          Answer the next pixel to encode in the image
(package private)  void nextPixels(byte[] buf, int lineWidth)
          Copy a row of pixel values from the image.
(package private)  void nextPutCode(int aCode)
          Output aCode to the output stream.
(package private)  void nextPutPixels(byte[] buf)
          Copy a row of pixel values to the image.
(package private)  int readBlock()
          Read a block from the byte stream.
(package private)  void writeBlock()
          Write a block to the byte stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bitsPerPixel

int bitsPerPixel

blockSize

int blockSize

blockIndex

int blockIndex

currentByte

int currentByte

bitsLeft

int bitsLeft

codeSize

int codeSize

clearCode

int clearCode

endCode

int endCode

newCodes

int newCodes

topSlot

int topSlot

currentSlot

int currentSlot

imageWidth

int imageWidth

imageHeight

int imageHeight

imageX

int imageX

imageY

int imageY

pass

int pass

line

int line

codeMask

int codeMask

buffer

int buffer

block

byte[] block

lineArray

byte[] lineArray

stack

int[] stack

suffix

int[] suffix

prefix

int[] prefix

nodeStack

LZWNode[] nodeStack

inputStream

LEDataInputStream inputStream

outputStream

LEDataOutputStream outputStream

image

org.eclipse.swt.graphics.ImageData image

loader

org.eclipse.swt.graphics.ImageLoader loader

interlaced

boolean interlaced

MASK_TABLE

static final int[] MASK_TABLE
Constructor Detail

LZWCodec

LZWCodec()
Method Detail

decode

void decode()
Decode the input.


decode

public void decode(LEDataInputStream inputStream,
                   org.eclipse.swt.graphics.ImageLoader loader,
                   org.eclipse.swt.graphics.ImageData image,
                   boolean interlaced,
                   int depth)
Decode the LZW-encoded bytes in the given byte stream into the given DeviceIndependentImage.


encode

void encode()
Encode the image.


encode

public void encode(LEDataOutputStream byteStream,
                   org.eclipse.swt.graphics.ImageData image)
Encode the bytes into the given byte stream from the given DeviceIndependentImage.


encodeLoop

int encodeLoop()
Encoding loop broken out to allow early return.


initializeForDecoding

void initializeForDecoding()
Initialize the receiver for decoding the given byte array.


initializeForEncoding

void initializeForEncoding()
Initialize the receiver for encoding the given byte array.


nextCode

int nextCode()
Answer the next code from the input byte array.


nextPixel

int nextPixel()
Answer the next pixel to encode in the image


nextPixels

void nextPixels(byte[] buf,
                int lineWidth)
Copy a row of pixel values from the image.


nextPutCode

void nextPutCode(int aCode)
Output aCode to the output stream.


nextPutPixels

void nextPutPixels(byte[] buf)
Copy a row of pixel values to the image.


copyRow

void copyRow(byte[] buf,
             int copies)
Copy duplicate rows of pixel values to the image. This is to fill in rows if the image is interlaced.


readBlock

int readBlock()
Read a block from the byte stream. Return the number of bytes read. Throw an exception if the block could not be read.


writeBlock

void writeBlock()
Write a block to the byte stream. Throw an exception if the block could not be written.