Class ChmItspHeader
- java.lang.Object
-
- org.apache.tika.parser.chm.accessor.ChmItspHeader
-
- All Implemented Interfaces:
java.io.Serializable
,ChmAccessor<ChmItspHeader>
public class ChmItspHeader extends java.lang.Object implements ChmAccessor<ChmItspHeader>
Directory header The directory starts with a header; its format is as follows: 0000: char[4] 'ITSP' 0004: DWORD Version number 1 0008: DWORD Length of the directory header 000C: DWORD $0a (unknown) 0010: DWORD $1000 Directory chunk size 0014: DWORD "Density" of quickref section, usually 2 0018: DWORD Depth of the index tree - 1 there is no index, 2 if there is one level of PMGI chunks 001C: DWORD Chunk number of root index chunk, -1 if there is none (though at least one file has 0 despite there being no index chunk, probably a bug) 0020: DWORD Chunk number of first PMGL (listing) chunk 0024: DWORD Chunk number of last PMGL (listing) chunk 0028: DWORD -1 (unknown) 002C: DWORD Number of directory chunks (total) 0030: DWORD Windows language ID 0034: GUID {5D02926A-212E-11D0-9DF9-00A0C922E6EC} 0044: DWORD $54 (This is the length again) 0048: DWORD -1 (unknown) 004C: DWORD -1 (unknown) 0050: DWORD -1 (unknown)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChmItspHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBlock_len()
Returns block's lengthint
getBlockidx_intvl()
Returns block index intervalint
getHeader_len()
Returns header lengthint
getIndex_depth()
Returns an index depthint
getIndex_head()
Returns an index headint
getIndex_root()
Returns index rootlong
getLang_id()
Returns language idlong
getNum_blocks()
Returns number of blocksbyte[]
getSignature()
Returns a signature of the headerbyte[]
getSystem_uuid()
Returns system uuidint
getUnknown_000c()
Returns 000c unknown bytesint
getUnknown_0024()
Returns 0024 unknown bytesint
getUnknown_002c()
Returns 002c unknown bytesbyte[]
getUnknown_0044()
Returns 0044 unknown bytesint
getVersion()
Returns version of itsp headervoid
parse(byte[] data, ChmItspHeader chmItspHeader)
Parses chm accessorjava.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getSignature
public byte[] getSignature()
Returns a signature of the header- Returns:
- itsp signature
-
getVersion
public int getVersion()
Returns version of itsp header- Returns:
- version
-
getHeader_len
public int getHeader_len()
Returns header length- Returns:
- header length
-
getUnknown_000c
public int getUnknown_000c()
Returns 000c unknown bytes
-
getBlock_len
public long getBlock_len()
Returns block's length- Returns:
- block_length
-
getBlockidx_intvl
public int getBlockidx_intvl()
Returns block index interval- Returns:
- blockidx_intvl
-
getIndex_depth
public int getIndex_depth()
Returns an index depth- Returns:
- index_depth
-
getIndex_root
public int getIndex_root()
Returns index root- Returns:
- index_root
-
getIndex_head
public int getIndex_head()
Returns an index head- Returns:
- index_head
-
getUnknown_0024
public int getUnknown_0024()
Returns 0024 unknown bytes- Returns:
- unknown_0024
-
getNum_blocks
public long getNum_blocks()
Returns number of blocks- Returns:
- num_blocks
-
getUnknown_002c
public int getUnknown_002c()
Returns 002c unknown bytes- Returns:
- unknown_002c
-
getLang_id
public long getLang_id()
Returns language id- Returns:
- lang_id
-
getSystem_uuid
public byte[] getSystem_uuid()
Returns system uuid- Returns:
- system_uuid
-
getUnknown_0044
public byte[] getUnknown_0044()
Returns 0044 unknown bytes- Returns:
- unknown_0044
-
parse
public void parse(byte[] data, ChmItspHeader chmItspHeader) throws TikaException
Description copied from interface:ChmAccessor
Parses chm accessor- Specified by:
parse
in interfaceChmAccessor<ChmItspHeader>
- Parameters:
data
- chm file- Throws:
TikaException
-
-