Class ThincSMsgFlagFBZData

java.lang.Object
  extended by ThincSMsgFlag
      extended by ThincSMsgFlagFBZData
All Implemented Interfaces:
ThincMsgFlag

public final class ThincSMsgFlagFBZData
extends ThincSMsgFlag

class for compress flag message and unzipping the compressed image.

Author:
Young Jin Yoon
See Also:
ThincSMsgFlag, ThincSMsgFBRawUpdate

Field Summary
private static java.util.zip.Inflater decompressor
           
private  ThincMsgHandler handler
           
private static java.nio.ByteBuffer hd
           
static int MESSAGE_SIZE
           
static int NONE
           
private  int[] pixels
           
static int PNG
           
private static java.nio.IntBuffer resultInt
           
private static int state
           
private static byte[] unziped
           
private static int usize
           
private static byte[] ziped
           
static int ZLIB
           
private static int zsize
           
 
Constructor Summary
ThincSMsgFlagFBZData(ThincMsgHandler h)
          creates ThincSMsgFlagFBZData object.
 
Method Summary
static int get()
          get() gets the current decompressing method
 java.nio.IntBuffer process()
          process() receives the header for compression and try to unzip the compressed image.
private  java.nio.IntBuffer processPNG()
           
 java.nio.IntBuffer processZLIB()
           
static boolean set(int flag)
          set() set the decompressing method by using flags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_SIZE

public static final int MESSAGE_SIZE
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

PNG

public static final int PNG
See Also:
Constant Field Values

ZLIB

public static final int ZLIB
See Also:
Constant Field Values

decompressor

private static java.util.zip.Inflater decompressor

state

private static int state

handler

private ThincMsgHandler handler

hd

private static java.nio.ByteBuffer hd

zsize

private static int zsize

usize

private static int usize

ziped

private static byte[] ziped

unziped

private static byte[] unziped

resultInt

private static java.nio.IntBuffer resultInt

pixels

private int[] pixels
Constructor Detail

ThincSMsgFlagFBZData

public ThincSMsgFlagFBZData(ThincMsgHandler h)
creates ThincSMsgFlagFBZData object.

Parameters:
h - ThincMsgHandler to handle the message
Method Detail

set

public static boolean set(int flag)
set() set the decompressing method by using flags.

Parameters:
flag - flag to use for decompression - NONE, PNG and ZLIB
Returns:
boolean value to set properly or not

get

public static int get()
get() gets the current decompressing method

Returns:
flag for decompressing method

process

public java.nio.IntBuffer process()
                           throws ThincException
process() receives the header for compression and try to unzip the compressed image.

Returns:
IntBuffer type of unziped image
Throws:
ThincException

processPNG

private java.nio.IntBuffer processPNG()
                               throws ThincException
Throws:
ThincException

processZLIB

public java.nio.IntBuffer processZLIB()
                               throws ThincException
Throws:
ThincException