com.mmbreakfast.unlod.app.handler
Class PCXDecoder

java.lang.Object
  extended bycom.mmbreakfast.unlod.app.handler.PCXDecoder

public class PCXDecoder
extends Object


Nested Class Summary
 class PCXDecoder.InvalidPCXFileException
           
 
Field Summary
protected static int BytesPerLine_OFFSET
           
protected static int Data_OFFSET
           
protected static int LO_SIX_BITS
           
protected static int NPlanes_OFFSET
           
protected static int TOP_TWO_BITS
           
protected static int Xmax_OFFSET
           
protected static int Xmin_OFFSET
           
protected static int Ymax_OFFSET
           
protected static int Ymin_OFFSET
           
 
Constructor Summary
PCXDecoder()
           
 
Method Summary
 ImageProducer decode(ByteArrayInputStream in)
           
 ImageProducer decode(RandomAccessFile in)
           
private  int readByte(ByteArrayInputStream in, int skip)
           
private  int readByte(RandomAccessFile in, long offset)
           
private  int readNibble(ByteArrayInputStream in, int skip)
           
private  int readNibble(RandomAccessFile in, long offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Xmin_OFFSET

protected static final int Xmin_OFFSET
See Also:
Constant Field Values

Ymin_OFFSET

protected static final int Ymin_OFFSET
See Also:
Constant Field Values

Xmax_OFFSET

protected static final int Xmax_OFFSET
See Also:
Constant Field Values

Ymax_OFFSET

protected static final int Ymax_OFFSET
See Also:
Constant Field Values

NPlanes_OFFSET

protected static final int NPlanes_OFFSET
See Also:
Constant Field Values

BytesPerLine_OFFSET

protected static final int BytesPerLine_OFFSET
See Also:
Constant Field Values

Data_OFFSET

protected static final int Data_OFFSET
See Also:
Constant Field Values

TOP_TWO_BITS

protected static final int TOP_TWO_BITS
See Also:
Constant Field Values

LO_SIX_BITS

protected static final int LO_SIX_BITS
See Also:
Constant Field Values
Constructor Detail

PCXDecoder

public PCXDecoder()
Method Detail

decode

public ImageProducer decode(ByteArrayInputStream in)
                     throws IOException,
                            PCXDecoder.InvalidPCXFileException
Throws:
IOException
PCXDecoder.InvalidPCXFileException

decode

public ImageProducer decode(RandomAccessFile in)
                     throws IOException,
                            PCXDecoder.InvalidPCXFileException
Throws:
IOException
PCXDecoder.InvalidPCXFileException

readNibble

private int readNibble(RandomAccessFile in,
                       long offset)
                throws IOException,
                       PCXDecoder.InvalidPCXFileException
Throws:
IOException
PCXDecoder.InvalidPCXFileException

readByte

private int readByte(RandomAccessFile in,
                     long offset)
              throws IOException,
                     PCXDecoder.InvalidPCXFileException
Throws:
IOException
PCXDecoder.InvalidPCXFileException

readNibble

private int readNibble(ByteArrayInputStream in,
                       int skip)
                throws PCXDecoder.InvalidPCXFileException
Throws:
PCXDecoder.InvalidPCXFileException

readByte

private int readByte(ByteArrayInputStream in,
                     int skip)
              throws PCXDecoder.InvalidPCXFileException
Throws:
PCXDecoder.InvalidPCXFileException