javazoom.jlgui.player.amp.util
Class BMPLoader

java.lang.Object
  extended by javazoom.jlgui.player.amp.util.BMPLoader

public class BMPLoader
extends java.lang.Object

A decoder for Windows bitmap (.BMP) files. Compression not supported.


Constructor Summary
BMPLoader()
           
 
Method Summary
protected  void getBitmapHeader()
           
 java.awt.Image getBMPImage(java.io.InputStream stream)
           
protected  void getFileHeader()
           
 java.awt.image.MemoryImageSource getImageSource()
           
protected  void getPalette()
           
protected  void getPixelData()
           
 void read(java.io.InputStream is)
           
protected  int readInt()
           
protected  int readScanLine(byte[] b, int off, int len)
           
protected  short readShort()
           
protected  void unpack(byte[] rawData, int rawOffset, int[] intData, int intOffset, int w)
           
protected  void unpack(byte[] rawData, int rawOffset, int bpp, byte[] byteData, int byteOffset, int w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BMPLoader

public BMPLoader()
Method Detail

getBMPImage

public java.awt.Image getBMPImage(java.io.InputStream stream)
                           throws java.lang.Exception
Throws:
java.lang.Exception

readInt

protected int readInt()
               throws java.io.IOException
Throws:
java.io.IOException

readShort

protected short readShort()
                   throws java.io.IOException
Throws:
java.io.IOException

getFileHeader

protected void getFileHeader()
                      throws java.io.IOException,
                             java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

getBitmapHeader

protected void getBitmapHeader()
                        throws java.io.IOException
Throws:
java.io.IOException

getPalette

protected void getPalette()
                   throws java.io.IOException
Throws:
java.io.IOException

unpack

protected void unpack(byte[] rawData,
                      int rawOffset,
                      int[] intData,
                      int intOffset,
                      int w)

unpack

protected void unpack(byte[] rawData,
                      int rawOffset,
                      int bpp,
                      byte[] byteData,
                      int byteOffset,
                      int w)
               throws java.lang.Exception
Throws:
java.lang.Exception

readScanLine

protected int readScanLine(byte[] b,
                           int off,
                           int len)
                    throws java.io.IOException
Throws:
java.io.IOException

getPixelData

protected void getPixelData()
                     throws java.io.IOException,
                            java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

read

public void read(java.io.InputStream is)
          throws java.io.IOException,
                 java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

getImageSource

public java.awt.image.MemoryImageSource getImageSource()


JavaZOOM 1999-2006