nwnintf.format.itp
Class ItpElement
java.lang.Object
|
+--nwnintf.format.itp.ItpElement
- Direct Known Subclasses:
- ItpCaprefElt, ItpDatrefElt, ItpFloat32Elt, ItpFloat64Elt, ItpInt16Elt, ItpInt32Elt, ItpInt64Elt, ItpInt8Elt, ItpListElt, ItpResrefElt, ItpStringElt, ItpStrrefElt, ItpUint16Elt, ItpUint32Elt, ItpUint64Elt, ItpUint8Elt
- public abstract class ItpElement
- extends java.lang.Object
Represent an "element" in the itp file.
Method Summary |
protected abstract int |
childData(ItpWriter w)
Write the element type-specific data to ItpWriter and return the
contents that should go in the data field in the element
structure for output. |
protected ItpFile |
file()
|
java.lang.String |
name()
|
static ItpElement |
newElement(ItpFile f,
byte[] bytes,
int offset)
|
void |
read(byte[] bytes,
int eltoffset,
int varnameoffset,
int vardataoffset,
int listoffset)
|
void |
removeChildren()
Subclasses that contain other entries or elements should
override this. |
void |
setName(java.lang.String name)
|
abstract int |
type()
|
void |
write(ItpWriter w)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_UINT8
public static int TYPE_UINT8
TYPE_INT8
public static int TYPE_INT8
TYPE_UINT16
public static int TYPE_UINT16
TYPE_INT16
public static int TYPE_INT16
TYPE_UINT32
public static int TYPE_UINT32
TYPE_INT32
public static int TYPE_INT32
TYPE_UINT64
public static int TYPE_UINT64
TYPE_INT64
public static int TYPE_INT64
TYPE_FLOAT32
public static int TYPE_FLOAT32
TYPE_FLOAT64
public static int TYPE_FLOAT64
TYPE_STRING
public static int TYPE_STRING
TYPE_RESREF
public static int TYPE_RESREF
TYPE_STRREF
public static int TYPE_STRREF
TYPE_DATREF
public static int TYPE_DATREF
TYPE_CAPREF
public static int TYPE_CAPREF
TYPE_LIST
public static int TYPE_LIST
SIZE
public static int SIZE
TYPE
public static int TYPE
NAMEIDX
public static int NAMEIDX
DATA
public static int DATA
ItpElement
public ItpElement(ItpFile f)
read
public void read(byte[] bytes,
int eltoffset,
int varnameoffset,
int vardataoffset,
int listoffset)
newElement
public static ItpElement newElement(ItpFile f,
byte[] bytes,
int offset)
throws java.lang.Exception
java.lang.Exception
file
protected ItpFile file()
name
public java.lang.String name()
setName
public void setName(java.lang.String name)
type
public abstract int type()
childData
protected abstract int childData(ItpWriter w)
throws java.io.IOException
- Write the element type-specific data to ItpWriter and return the
contents that should go in the data field in the element
structure for output.
java.io.IOException
removeChildren
public void removeChildren()
- Subclasses that contain other entries or elements should
override this.
write
public void write(ItpWriter w)
throws java.io.IOException
java.io.IOException