org.jfree.pixie.wmf.bitmap
Class BitmapReader

java.lang.Object
  extended by org.jfree.pixie.wmf.bitmap.BitmapReader

public class BitmapReader
extends java.lang.Object


Nested Class Summary
protected static class BitmapReader.BitmapHeader
           
 
Constructor Summary
BitmapReader()
           
 
Method Summary
static double constructDouble(byte[] in, int offset)
           
static int constructInt(byte[] in, int offset)
           
static int constructInt3(byte[] in, int offset)
           
static long constructLong(byte[] in, int offset)
           
static short constructShort(byte[] in, int offset)
           
static java.awt.Image load(java.lang.String sdir)
          load method - see read for details
static java.awt.Image read(java.io.FileInputStream fs)
           
protected static java.awt.Image readMap24(java.io.FileInputStream fs, BitmapReader.BitmapHeader bh)
          readMap24 internal routine to read the bytes in a 24 bit bitmap
protected static java.awt.Image readMap32(java.io.FileInputStream fs, BitmapReader.BitmapHeader bh)
          readMap24 internal routine to read the bytes in a 24 bit bitmap
protected static java.awt.Image readMap8(java.io.FileInputStream fs, BitmapReader.BitmapHeader bh)
          readMap8 internal routine to read the bytes in a 8 bit bitmap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitmapReader

public BitmapReader()
Method Detail

constructInt

public static int constructInt(byte[] in,
                               int offset)

constructInt3

public static int constructInt3(byte[] in,
                                int offset)

constructLong

public static long constructLong(byte[] in,
                                 int offset)

constructDouble

public static double constructDouble(byte[] in,
                                     int offset)

constructShort

public static short constructShort(byte[] in,
                                   int offset)

read

public static java.awt.Image read(java.io.FileInputStream fs)

readMap32

protected static java.awt.Image readMap32(java.io.FileInputStream fs,
                                          BitmapReader.BitmapHeader bh)
                                   throws java.io.IOException
readMap24 internal routine to read the bytes in a 24 bit bitmap

Parameters:
fs - file stream
bh - header struct
Returns:
Image Object, be sure to check for (Image)null !!!!
Throws:
java.io.IOException

readMap24

protected static java.awt.Image readMap24(java.io.FileInputStream fs,
                                          BitmapReader.BitmapHeader bh)
                                   throws java.io.IOException
readMap24 internal routine to read the bytes in a 24 bit bitmap

Parameters:
fs - file stream
bh - header struct
Returns:
Image Object, be sure to check for (Image)null !!!!
Throws:
java.io.IOException

readMap8

protected static java.awt.Image readMap8(java.io.FileInputStream fs,
                                         BitmapReader.BitmapHeader bh)
                                  throws java.io.IOException
readMap8 internal routine to read the bytes in a 8 bit bitmap

Parameters:
fs - file stream
bh - header struct
Returns:
Image Object, be sure to check for (Image)null !!!!
Throws:
java.io.IOException

load

public static java.awt.Image load(java.lang.String sdir)
load method - see read for details

Parameters:
sdir - full path name
Returns:
Image Object, be sure to check for (Image)null !!!!