nwnintf.format.itp
Class ItpWriter

java.lang.Object
  |
  +--nwnintf.format.itp.ItpWriter

public class ItpWriter
extends java.lang.Object


Constructor Summary
ItpWriter(ItpFile f)
           
 
Method Summary
 byte[] bytes()
          Serialize this ItpFile to a sequence of bytes.
 ItpStream elements()
           
 ItpStream entries()
           
 ItpStream header()
           
 ItpStream list()
           
 ItpStream multimap()
           
 int nvarnames()
           
 ItpStream vardata()
           
 int varname(java.lang.String s)
          Add a new variable name to the file.
 ItpStream varnames()
          Don't call this to add a new variable name.
 void writeElement(int type, java.lang.String name, int data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItpWriter

public ItpWriter(ItpFile f)
Method Detail

header

public ItpStream header()

entries

public ItpStream entries()

elements

public ItpStream elements()

varnames

public ItpStream varnames()
Don't call this to add a new variable name. Use varname(String). so the names can be interned.

See Also:
varname(String)

vardata

public ItpStream vardata()

multimap

public ItpStream multimap()

list

public ItpStream list()

varname

public int varname(java.lang.String s)
            throws java.io.IOException
Add a new variable name to the file.

Parameters:
s - Variable name
Returns:
Index of variable name sectin.
java.io.IOException

nvarnames

public int nvarnames()

writeElement

public void writeElement(int type,
                         java.lang.String name,
                         int data)
                  throws java.io.IOException
java.io.IOException

bytes

public byte[] bytes()
             throws java.lang.Exception
Serialize this ItpFile to a sequence of bytes.

Returns:
The sequence of bytes representing this ItpFile in bioware's ITP format.
java.lang.Exception