Package org.apache.poi.hdgf.chunks
Class ChunkHeader
java.lang.Object
org.apache.poi.hdgf.chunks.ChunkHeader
- Direct Known Subclasses:
ChunkHeaderV4V5
,ChunkHeaderV6
A chunk header
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.abstract Charset
static int
getHeaderSize
(int documentVersion) Returns the size of a chunk header for the given document version.int
getId()
int
Returns the length of the trunk, excluding the length of the header, trailer or separator.abstract int
int
getType()
Returns the type of the chunk, which affects the mandatory informationint
abstract boolean
abstract boolean
-
Constructor Details
-
ChunkHeader
public ChunkHeader()
-
-
Method Details
-
createChunkHeader
Creates the appropriate ChunkHeader for the Chunk Header at the given location, for the given document version.- Parameters:
documentVersion
- the documentVersion - 4 and higher is supporteddata
- the chunk dataoffset
- the start offset in the chunk data- Returns:
- the ChunkHeader
-
getHeaderSize
public static int getHeaderSize(int documentVersion) Returns the size of a chunk header for the given document version.- Parameters:
documentVersion
- the documentVersion - 4 and higher is supported- Returns:
- the header size
-
getSizeInBytes
public abstract int getSizeInBytes() -
hasTrailer
public abstract boolean hasTrailer() -
hasSeparator
public abstract boolean hasSeparator() -
getChunkCharset
-
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.- Returns:
- the length of the trunk
-
getType
public int getType()Returns the type of the chunk, which affects the mandatory information- Returns:
- the type of the chunk
-
getUnknown1
public int getUnknown1()
-