|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nwnintf.format.mod.ModFile
Represent a "mod"/"sav"/"erf"/"hak"/"nwm" etc. file. Cannot be used to create a new module file entirely from scratch, but it could be modified to do so. See Torlack's file format description: http://www.torlack.com/index.html?topics=nwndata_mod
Field Summary | |
static int |
DAY
|
static int |
NRESOURCES
|
static int |
NSTRINGS
|
static int |
PADDING
|
static int |
PADDINGSIZE
|
static int |
POSOFFSET
|
static int |
RESOFFSET
|
static int |
SIZE
|
static int |
STRINGOFFSET
|
static int |
STRINGSLEN
|
static int |
TYPE
|
static int |
TYPE_MOD
|
static int |
TYPE_NWM
|
static int |
TYPE_SAV
|
static int |
TYPECODE
|
static int |
VERSION
|
static int |
YEAR
|
Constructor Summary | |
ModFile(java.io.File f)
|
Method Summary | |
void |
addupdateresource(ResRef resref,
byte[] resdata)
Add a new resource to the file, or update an existing one. |
boolean |
contains(ResRef resref)
Test whether the module contains a resource by this name and type. |
void |
deleteresource(ResRef resref)
Delete a resource from the module file. |
ModResDesc |
descAt(int idx)
Return the idx'th ModResDesc. |
java.util.Iterator |
iterator(int type)
Produce an iterator that iterates over all ResRef objects in the file that have the given type. |
static void |
main(java.lang.String[] args)
|
int |
nresources()
|
byte[] |
resource(ModResDesc desc)
|
byte[] |
resource(ModResPosn posn)
|
byte[] |
resource(ResRef resref)
Get a copy of a resource file in the module. |
java.lang.String |
type()
|
java.lang.String |
version()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int TYPE
public static int VERSION
public static int NSTRINGS
public static int STRINGSLEN
public static int NRESOURCES
public static int STRINGOFFSET
public static int RESOFFSET
public static int POSOFFSET
public static int YEAR
public static int DAY
public static int TYPECODE
public static int PADDING
public static int PADDINGSIZE
public static int SIZE
public static int TYPE_MOD
public static int TYPE_SAV
public static int TYPE_NWM
Constructor Detail |
public ModFile(java.io.File f) throws java.lang.Exception
Method Detail |
public java.lang.String type()
public java.lang.String version()
public ModResDesc descAt(int idx)
public int nresources()
public java.util.Iterator iterator(int type)
public boolean contains(ResRef resref)
public byte[] resource(ResRef resref) throws java.io.IOException
java.io.IOException
public byte[] resource(ModResDesc desc) throws java.io.IOException
java.io.IOException
public byte[] resource(ModResPosn posn) throws java.io.IOException
java.io.IOException
public void addupdateresource(ResRef resref, byte[] resdata) throws java.io.IOException
resref
- Name of resource file.resdata
- Bytes making up the resource.
java.io.IOException
public void deleteresource(ResRef resref) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |