Class MutableIFFChunk

java.lang.Object
org.monte.media.tree.TreeNode<MutableIFFChunk>
org.monte.media.iff.MutableIFFChunk

public class MutableIFFChunk extends TreeNode<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]".
Author:
Werner Randelshofer
  • Field Details

  • 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

      public MutableIFFChunk(String id, String type)
      Creates a new instance.
    • MutableIFFChunk

      public MutableIFFChunk(String id, byte[] data)
      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

      public String dump()
    • dump

      public String dump(int depth)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • idToString

      public static String idToString(int anID)
      Convert an integer IFF identifier to String.
      Parameters:
      anID - to be converted.
      Returns:
      String representation of the ID.
    • stringToId

      public static int stringToId(String aString)
      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

      public void read(File f) throws IOException
      Throws:
      IOException
    • read

      public void read(MC68000InputStream in) throws IOException
      Throws:
      IOException
    • Write

      public void Write(File f) throws IOException
      Throws:
      IOException
    • write

      public void write(MC68000OutputStream out) throws IOException
      Throws:
      IOException