Copyright 2011-01-06 Werner Randelshofer

ch.randelshofer.media.iff
Class IFFChunk

java.lang.Object
  extended by ch.randelshofer.media.iff.IFFChunk

public class IFFChunk
extends java.lang.Object

IFF Chunks form the building blocks of an IFF file. This class is made for reading purposes only. See MutableIFFChunk for writing purposes.

Version:
1.1 2006-07-20 Reworked for Java 1.5.
1.0 1999-10-19
Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Immensee, Switzerland

Constructor Summary
IFFChunk(int type, int id)
           
IFFChunk(int type, int id, long size, long scan)
           
IFFChunk(int type, int id, long size, long scan, IFFChunk propGroup)
           
 
Method Summary
 void addCollectionChunk(IFFChunk chunk)
           
 java.util.Enumeration collectionChunks()
           
 boolean equals(java.lang.Object another)
           
 IFFChunk[] getCollectionChunks(int id)
           
 byte[] getData()
          Gets the data.
 int getID()
           
 IFFChunk getPropertyChunk(int id)
           
 long getScan()
           
 long getSize()
           
 int getType()
           
 int hashCode()
           
 java.util.Enumeration propertyChunks()
           
 void putPropertyChunk(IFFChunk chunk)
           
 void setData(byte[] data)
          Sets the data.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IFFChunk

public IFFChunk(int type,
                int id)

IFFChunk

public IFFChunk(int type,
                int id,
                long size,
                long scan)

IFFChunk

public IFFChunk(int type,
                int id,
                long size,
                long scan,
                IFFChunk propGroup)
Method Detail

getID

public int getID()
Returns:
ID of chunk.

getType

public int getType()
Returns:
Type of chunk.

getSize

public long getSize()
Returns:
Size of chunk.

getScan

public long getScan()
Returns:
Scan position of chunk within the file.

putPropertyChunk

public void putPropertyChunk(IFFChunk chunk)

getPropertyChunk

public IFFChunk getPropertyChunk(int id)

propertyChunks

public java.util.Enumeration propertyChunks()

addCollectionChunk

public void addCollectionChunk(IFFChunk chunk)

getCollectionChunks

public IFFChunk[] getCollectionChunks(int id)

collectionChunks

public java.util.Enumeration collectionChunks()

setData

public void setData(byte[] data)
Sets the data. Note: The array will not be cloned.


getData

public byte[] getData()
Gets the data. Note: The array will not be cloned.


equals

public boolean equals(java.lang.Object another)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2011-01-06 Werner Randelshofer