|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.image.XBMFile
public class XBMFile
XBMFile is a class which reads in a bitmap file, and provides the parameters of the file. If called from the command line, it draws the bitmap to the command line using spaces and asterisks. It just needs a valid path to a bitmap file, either a .xbm or .bm format, or a File object for a bitmap file.
Field Summary | |
---|---|
byte[] |
bits
|
java.io.File |
f
|
short |
height
|
int |
paddedWidth
|
short |
width
|
Constructor Summary | |
---|---|
XBMFile(java.io.File fileObj)
|
|
XBMFile(short w,
short h,
byte[] b)
This method leaves all to the caller, by creating a bitmap from scratch. |
|
XBMFile(java.lang.String filename)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
The main function just prints the bitmap to stdout. |
void |
printout()
Prints the bitmap to stdout, using * and spaces |
void |
setBits(java.lang.String tmpString)
Setting the bits based on a string of 0x00 numbers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.io.File f
public short width
public short height
public byte[] bits
public int paddedWidth
Constructor Detail |
---|
public XBMFile(java.lang.String filename)
public XBMFile(java.io.File fileObj)
public XBMFile(short w, short h, byte[] b)
h
- Height of bitmap.w
- Width of bitmap.b
- byte string representing the pixels.Method Detail |
---|
public void setBits(java.lang.String tmpString)
public void printout()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |