## org.apache.poi.hdgf.chunks
Class ChunkHeader

    java.lang.Object
      org.apache.poi.hdgf.chunks.ChunkHeader

Direct Known Subclasses:
  ChunkHeaderV4V5, ChunkHeaderV6

    public abstract class ChunkHeader

extends java.lang.Object

A chunk header

Field Summary
`protected int` `id`
`protected int` `length`
`protected int` `type`
`protected int` `unknown1`

Constructor Summary
`ChunkHeader()`

Method Summary
`static ChunkHeader` `createChunkHeader(int documentVersion, byte[] data, int offset)` Creates the appropriate ChunkHeader for the Chunk Header at the given location, for the given document version.
`static int` `getHeaderSize(int documentVersion)` Returns the size of a chunk header for the given document version.
`int` `getId()` Returns the ID/IX of the chunk
`int` `getLength()` Returns the length of the trunk, excluding the length of the header, trailer or separator.
`abstract int` `getSizeInBytes()`
`int` `getType()` Returns the type of the chunk, which affects the mandatory information
`int` `getUnknown1()`
`abstract boolean` `hasSeparator()`
`abstract boolean` `hasTrailer()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### type

    protected int type

### id

    protected int id

### length

    protected int length

### unknown1

    protected int unknown1

Constructor Detail

### ChunkHeader

    public ChunkHeader()

Method Detail

### createChunkHeader

    public static ChunkHeader createChunkHeader(int documentVersion,
                                                byte[] data,
                                                int offset)

  Creates the appropriate ChunkHeader for the Chunk Header at the given location, for the given document version.

### getHeaderSize

    public static int getHeaderSize(int documentVersion)

  Returns the size of a chunk header for the given document version.

### getSizeInBytes

    public abstract int getSizeInBytes()

### hasTrailer

    public abstract boolean hasTrailer()

### hasSeparator

    public abstract boolean hasSeparator()

### getId

    public int getId()

  Returns the ID/IX of the chunk

### getLength

    public int getLength()

  Returns the length of the trunk, excluding the length of the header, trailer or separator.

### getType

    public int getType()

  Returns the type of the chunk, which affects the mandatory information

### getUnknown1

    public int getUnknown1()

Copyright 2012 The Apache Software Foundation or its licensors, as applicable.