org.zmpp.iff
Interface Chunk

All Known Subinterfaces:
FormChunk
All Known Implementing Classes:
DefaultChunk, DefaultFormChunk

public interface Chunk

The basic data structure for an IFF file, a chunk.

Version:
1.0
Author:
Wei-ju Wu

Field Summary
static int CHUNK_HEADER_LENGTH
          The chunk header size.
static int CHUNK_ID_LENGTH
          The length of an IFF chunk id in bytes.
static int CHUNK_SIZEWORD_LENGTH
          The length of an IFF chunk size word in bytes.
 
Method Summary
 byte[] getId()
          Returns this IFF chunk's id.
 MemoryAccess getMemoryAccess()
          Returns a memory access object to the chunk.
 int getSize()
          The chunk data size, excluding id and size word.
 boolean isValid()
          Returns true if this is a valid chunk.
 

Field Detail

CHUNK_ID_LENGTH

static final int CHUNK_ID_LENGTH
The length of an IFF chunk id in bytes.

See Also:
Constant Field Values

CHUNK_SIZEWORD_LENGTH

static final int CHUNK_SIZEWORD_LENGTH
The length of an IFF chunk size word in bytes.

See Also:
Constant Field Values

CHUNK_HEADER_LENGTH

static final int CHUNK_HEADER_LENGTH
The chunk header size.

See Also:
Constant Field Values
Method Detail

getId

byte[] getId()
Returns this IFF chunk's id. An id is a 4 byte array.

Returns:
the id

getSize

int getSize()
The chunk data size, excluding id and size word.

Returns:
the size

isValid

boolean isValid()
Returns true if this is a valid chunk.

Returns:
true if valid, false otherwise

getMemoryAccess

MemoryAccess getMemoryAccess()
Returns a memory access object to the chunk.

Returns:
the MemoryAccess object


Copyright © 2005 . All Rights Reserved.