|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--hotline.iconlib.HLExtractor
use this class to open the hotline.dat file, access ICONs, GIFfs, etc.
| Field Summary | |
boolean |
hasGIF
true if there are GIFf-entries, false otherwise |
boolean |
hasICON
true if there are ICON-entries, false otherwise |
int |
idGIFTable
you should check hasGIF before you use this to get access to the GIF-table in the indexTable structure. |
int |
idICONTable
you should check hasICON before you use this to get access to the ICON-table in the indexTable structure. |
hotline.iconlib.HLIndexTable |
indexTable
gives access to the various tables, such as GIFf, ICON, ... |
| Constructor Summary | |
HLExtractor()
|
|
| Method Summary | |
void |
close()
closes the internally opened hotline.dat file |
byte[] |
createWinBitmap(hotline.iconlib.HLIconData hlicd)
create a bitmap from a HLIconData object |
javax.swing.Icon |
doTransitions(hotline.iconlib.HLIconData hlIconData)
create an icon from a HLIconData object |
java.awt.Color |
getAlpha()
get the current padding |
byte[] |
getGIF(int identity)
extracts a gif (-banner) from the hotline.dat-file |
hotline.iconlib.HLIconData |
getIcon(int identity)
gets an icon by its identity |
int |
getPadSize()
get the current padding |
int |
getTableOffset()
extract the tables offset from the hotline file |
int |
getTableSize()
extract the tables size from the hotline file |
boolean |
isHotline(long tableOffset)
validate whether the given file is a correct hotline.dat file |
boolean |
open(java.lang.String name)
open a hotline.dat file, reference is stored internally |
boolean |
quickStart(java.lang.String hotlineFile)
quick start function note: use of this function is highly recommended - it does the whole job for you example: hv = new HLExtractor(); if (! |
void |
setAlpha(java.awt.Color newAlpha)
change the alpha value |
void |
setPadSize(int newSize)
change the padding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public hotline.iconlib.HLIndexTable indexTable
public boolean hasGIF
public boolean hasICON
public int idGIFTable
HLExtractor hv;
HLTable ht;
...
ht = hv.indexTable.get(hv.idGIFTable);
...
value: -1 if there is no table in the indexTable structure, >=0 otherwise
public int idICONTable
HLExtractor hv;
HLTable ht;
...
ht = hv.indexTable.get(hv.idICONTable);
...
value: -1 if there is no table in the indexTable structure, >=0 otherwise
| Constructor Detail |
public HLExtractor()
| Method Detail |
public void setPadSize(int newSize)
public void setAlpha(java.awt.Color newAlpha)
public int getPadSize()
public java.awt.Color getAlpha()
public hotline.iconlib.HLIconData getIcon(int identity)
throws java.io.IOException
identity - icon identity number
java.io.IOExceptionpublic javax.swing.Icon doTransitions(hotline.iconlib.HLIconData hlIconData)
hlIconData - icon data stored in a HLIconData object
public byte[] createWinBitmap(hotline.iconlib.HLIconData hlicd)
hlicd - icon data stored in a HLIconData object
public boolean isHotline(long tableOffset)
throws java.io.IOException
tableOffset - vector tables offset
java.io.IOException
public int getTableSize()
throws java.io.IOException
java.io.IOException
public int getTableOffset()
throws java.io.IOException
java.io.IOException
public boolean quickStart(java.lang.String hotlineFile)
throws java.io.IOException
hv = new HLExtractor();
if (!hv.quickStart("hotline.dat")) {
return;
}
// now an icon extraction
hlid = hv.getIcon (128);
if (hlid != null) {
fpos = hv.indexTable.get(hv.idICONTable).find(ic);
hld = hv.indexTable.get(hv.idICONTable).get(fpos);
if (hld == null)
{
System.out.println("No object is at that pos!");
}
else {
wbmp = hv.createWinBitmap(hlid, hld);
tname = new String("Icon"+(int) hld.getIdentity());
tname=tname.concat(".bmp");
tempFile = new FileOutputStream(tname);
tempFile.write(wbmp);
tempFile.close();
}
}
hv.close();
java.io.IOException
public boolean open(java.lang.String name)
throws java.io.IOException
name - full path and name to the hotline.dat file
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public byte[] getGIF(int identity)
throws java.io.IOException
identity - identity of the GIF-images
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||