edu.harvard.hul.ois.jhove.module.iff
Class ChunkHeader

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.module.iff.ChunkHeader

public class ChunkHeader
extends java.lang.Object

This class encapsulates an IFF/AIFF chunk header.

Author:
Gary McGath

Constructor Summary
ChunkHeader(ModuleBase module, RepInfo info)
          Constructor.
 
Method Summary
 java.lang.String getID()
          Returns the chunk type, which is a 4-character code
 long getSize()
          Returns the chunk size (excluding the first 8 bytes)
 boolean readHeader(java.io.DataInputStream dstrm)
          Reads the header of a chunk.
 void setID(java.lang.String id)
          Sets the chunk type, which is a 4-character code, directly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkHeader

public ChunkHeader(ModuleBase module,
                   RepInfo info)
Constructor.

Parameters:
module - The module under which the chunk is being read
info - The RepInfo object being used by the module
Method Detail

readHeader

public boolean readHeader(java.io.DataInputStream dstrm)
                   throws java.io.IOException
Reads the header of a chunk. If _chunkID is non-null, it's assumed to have already been read.

Throws:
java.io.IOException

setID

public void setID(java.lang.String id)
Sets the chunk type, which is a 4-character code, directly.


getID

public java.lang.String getID()
Returns the chunk type, which is a 4-character code


getSize

public long getSize()
Returns the chunk size (excluding the first 8 bytes)