public class MutableIFFChunk
extends javax.swing.tree.DefaultMutableTreeNode
Syntax of an IFF Chunk:
Chunk ::= ID #{ UBYTE* } [0]
Property ::= Chunk
FORM ::= "FORM" #{ FormType (LocalChunk | FORM | LIST | CAT)* }
FormType ::= ID
LocalChunk ::= Property | Chunk
CAT ::= "CAT " #{ ContentsType {FROM | LIST | CAT)* }
ContentsType ::= ID -- a hint or an "abstract data type" ID
LIST ::= "LIST" #{ ContentsType PROP* {FORM | LIST | CAT)* }
PROP ::= "PROP" #{ FormType Property* }
In this extended regular expression notation the token "#" represents
a count of the following braced data types. Literal items are shown in
"quotes", [square bracketed items] are optional, and "*" means 0 or more
instances. A sometimes-needed pad is shown as "[0]".| Modifier and Type | Field and Description |
|---|---|
static int |
ID_CAT
ID for CATGroupExpression.
|
static int |
ID_FILLER
ID for unlabeled CATGroupExpressions.
|
static int |
ID_FORM
ID for FORMGroupExpression.
|
static int |
ID_LIST
ID for CATGroupExpression.
|
static int |
ID_PROP
ID for PROPGroupExpression.
|
| Constructor and Description |
|---|
MutableIFFChunk()
Creates a new instance.
|
MutableIFFChunk(int id,
byte[] data)
Creates a new instance.
|
MutableIFFChunk(int id,
int type)
Creates a new instance.
|
MutableIFFChunk(java.lang.String id,
byte[] data)
Creates a new instance.
|
MutableIFFChunk(java.lang.String id,
java.lang.String type)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Vector<MutableIFFChunk> |
childChunks() |
java.lang.String |
dump() |
java.lang.String |
dump(int depth) |
byte[] |
getData() |
int |
getId() |
int |
getLength() |
int |
getType() |
static java.lang.String |
idToString(int anID)
Convert an integer IFF identifier to String.
|
void |
read(java.io.File f) |
void |
read(MC68000InputStream in) |
void |
setData(byte[] newValue) |
void |
setId(int newValue) |
void |
setType(int newValue) |
static int |
stringToId(java.lang.String aString)
Converts the first four letters of the
String into an IFF Identifier.
|
java.lang.String |
toString() |
void |
Write(java.io.File f) |
void |
write(MC68000OutputStream out) |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObjectpublic static final int ID_FORM
public static final int ID_CAT
public static final int ID_LIST
public static final int ID_PROP
public static final int ID_FILLER
public MutableIFFChunk()
public MutableIFFChunk(int id,
int type)
public MutableIFFChunk(int id,
byte[] data)
public MutableIFFChunk(java.lang.String id,
java.lang.String type)
public MutableIFFChunk(java.lang.String id,
byte[] data)
public void setType(int newValue)
public void setId(int newValue)
public void setData(byte[] newValue)
public int getType()
public int getId()
public byte[] getData()
public int getLength()
public java.util.Vector<MutableIFFChunk> childChunks()
public java.lang.String dump()
public java.lang.String dump(int depth)
public java.lang.String toString()
toString in class javax.swing.tree.DefaultMutableTreeNodepublic static java.lang.String idToString(int anID)
anID - to be converted.public static int stringToId(java.lang.String aString)
aString - String to be converted.public void read(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic void read(MC68000InputStream in) throws java.io.IOException
java.io.IOExceptionpublic void Write(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic void write(MC68000OutputStream out) throws java.io.IOException
java.io.IOException