|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
ch.randelshofer.media.iff.MutableIFFChunk
public class MutableIFFChunk
MutableIFFChunk.
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]".
| Field Summary | |
|---|---|
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. |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
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, setUserObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
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.IOException
public void read(MC68000InputStream in)
throws java.io.IOException
java.io.IOException
public void Write(java.io.File f)
throws java.io.IOException
java.io.IOException
public void write(MC68000OutputStream out)
throws java.io.IOException
java.io.IOException
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||