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]".- Author:
- Werner Randelshofer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intID for CATGroupExpression.static final intID for unlabeled CATGroupExpressions.static final intID for FORMGroupExpression.static final intID for CATGroupExpression.static final intID for PROPGroupExpression. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.MutableIFFChunk(int id, byte[] data) Creates a new instance.MutableIFFChunk(int id, int type) Creates a new instance.MutableIFFChunk(String id, byte[] data) Creates a new instance.MutableIFFChunk(String id, String type) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondump()dump(int depth) byte[]getData()intgetId()intintgetType()static StringidToString(int anID) Convert an integer IFF identifier to String.voidvoidvoidsetData(byte[] newValue) voidsetId(int newValue) voidsetType(int newValue) static intstringToId(String aString) Converts the first four letters of the String into an IFF Identifier.toString()voidwrite(MC68000OutputStream out) voidMethods inherited from class org.monte.media.tree.TreeNode
add, children, getChildAt, getChildCount, getParent, remove, removeAllChildren, setParent, sortChildren
-
Field Details
-
ID_FORM
public static final int ID_FORMID for FORMGroupExpression.- See Also:
-
ID_CAT
public static final int ID_CATID for CATGroupExpression.- See Also:
-
ID_LIST
public static final int ID_LISTID for CATGroupExpression.- See Also:
-
ID_PROP
public static final int ID_PROPID for PROPGroupExpression.- See Also:
-
ID_FILLER
public static final int ID_FILLERID for unlabeled CATGroupExpressions.- See Also:
-
-
Constructor Details
-
MutableIFFChunk
public MutableIFFChunk()Creates a new instance. -
MutableIFFChunk
public MutableIFFChunk(int id, int type) Creates a new instance. -
MutableIFFChunk
public MutableIFFChunk(int id, byte[] data) Creates a new instance. -
MutableIFFChunk
Creates a new instance. -
MutableIFFChunk
Creates a new instance.
-
-
Method Details
-
setType
public void setType(int newValue) -
setId
public void setId(int newValue) -
setData
public void setData(byte[] newValue) -
getType
public int getType() -
getId
public int getId() -
getData
public byte[] getData() -
getLength
public int getLength() -
dump
-
dump
-
toString
-
idToString
Convert an integer IFF identifier to String.- Parameters:
anID- to be converted.- Returns:
- String representation of the ID.
-
stringToId
Converts the first four letters of the String into an IFF Identifier.- Parameters:
aString- String to be converted.- Returns:
- ID representation of the String.
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
Write
- Throws:
IOException
-
write
- Throws:
IOException
-