org.apache.tika.parser.chm.accessor
Class ChmItspHeader

java.lang.Object
  extended by org.apache.tika.parser.chm.accessor.ChmItspHeader
All Implemented Interfaces:
Serializable, ChmAccessor<ChmItspHeader>

public class ChmItspHeader
extends 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) ://translated.by/you/microsoft-s-html-help-chm-format-incomplete/original /?show-translation-form=1

See Also:
Serialized Form

Constructor Summary
ChmItspHeader()
           
 
Method Summary
 long getBlock_len()
          Returns block's length
 int getBlockidx_intvl()
          Returns block index interval
 int getHeader_len()
          Returns header length
 int getIndex_depth()
          Returns an index depth
 int getIndex_head()
          Returns an index head
 int getIndex_root()
          Returns index root
 long getLang_id()
          Returns language id
 long getNum_blocks()
          Returns number of blocks
 byte[] getSignature()
          Returns a signature of the header
 byte[] getSystem_uuid()
          Returns system uuid
 int getUnknown_000c()
          Returns 000c unknown bytes
 int getUnknown_0024()
          Returns 0024 unknown bytes
 int getUnknown_002c()
          Returns 002c unknown bytes
 byte[] getUnknown_0044()
          Returns 0044 unknown bytes
 int getVersion()
          Returns version of itsp header
static void main(String[] args)
           
 void parse(byte[] data, ChmItspHeader chmItspHeader)
          Parses chm accessor
protected  void setBlock_len(long block_len)
          Sets block length
protected  void setBlockidx_intvl(int blockidx_intvl)
          Sets block index interval
protected  void setHeader_len(int header_len)
          Sets itsp header length
protected  void setIndex_depth(int index_depth)
          Sets an index depth
protected  void setIndex_head(int index_head)
          Sets an index head
protected  void setIndex_root(int index_root)
          Sets an index root
protected  void setLang_id(long lang_id)
          Sets language id
protected  void setNum_blocks(long num_blocks)
          Sets number of blocks containing in the chm file
protected  void setSignature(byte[] signature)
          Sets itsp signature
protected  void setSystem_uuid(byte[] system_uuid)
          Sets system uuid
protected  void setUnknown_000c(int unknown_000c)
          Sets 000c unknown bytes Unknown means here that those guys who cracked the chm format do not know what's it purposes for
protected  void setUnknown_0024(int unknown_0024)
          Sets 0024 unknown bytes
protected  void setUnknown_002c(int unknown_002c)
          Sets 002c unknown bytes
protected  void setUnknown_0044(byte[] unknown_0044)
          Sets 0044 unknown bytes
protected  void setVersion(int version)
          Sets a version of itsp header
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChmItspHeader

public ChmItspHeader()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getSignature

public byte[] getSignature()
Returns a signature of the header

Returns:
itsp signature

setSignature

protected void setSignature(byte[] signature)
Sets itsp signature

Parameters:
signature -

getVersion

public int getVersion()
Returns version of itsp header

Returns:
version

setVersion

protected void setVersion(int version)
Sets a version of itsp header

Parameters:
version -

getHeader_len

public int getHeader_len()
Returns header length

Returns:
header length

setHeader_len

protected void setHeader_len(int header_len)
Sets itsp header length

Parameters:
header_len -

getUnknown_000c

public int getUnknown_000c()
Returns 000c unknown bytes


setUnknown_000c

protected void setUnknown_000c(int unknown_000c)
Sets 000c unknown bytes Unknown means here that those guys who cracked the chm format do not know what's it purposes for

Parameters:
unknown_000c -

getBlock_len

public long getBlock_len()
Returns block's length

Returns:
block_length

setBlock_len

protected void setBlock_len(long block_len)
Sets block length

Parameters:
block_len -

getBlockidx_intvl

public int getBlockidx_intvl()
Returns block index interval

Returns:
blockidx_intvl

setBlockidx_intvl

protected void setBlockidx_intvl(int blockidx_intvl)
Sets block index interval

Parameters:
blockidx_intvl -

getIndex_depth

public int getIndex_depth()
Returns an index depth

Returns:
index_depth

setIndex_depth

protected void setIndex_depth(int index_depth)
Sets an index depth

Parameters:
index_depth -

getIndex_root

public int getIndex_root()
Returns index root

Returns:
index_root

setIndex_root

protected void setIndex_root(int index_root)
Sets an index root

Parameters:
index_root -

getIndex_head

public int getIndex_head()
Returns an index head

Returns:
index_head

setIndex_head

protected void setIndex_head(int index_head)
Sets an index head

Parameters:
index_head -

getUnknown_0024

public int getUnknown_0024()
Returns 0024 unknown bytes

Returns:
unknown_0024

setUnknown_0024

protected void setUnknown_0024(int unknown_0024)
Sets 0024 unknown bytes

Parameters:
unknown_0024 -

getNum_blocks

public long getNum_blocks()
Returns number of blocks

Returns:
num_blocks

setNum_blocks

protected void setNum_blocks(long num_blocks)
Sets number of blocks containing in the chm file

Parameters:
num_blocks -

getUnknown_002c

public int getUnknown_002c()
Returns 002c unknown bytes

Returns:
unknown_002c

setUnknown_002c

protected void setUnknown_002c(int unknown_002c)
Sets 002c unknown bytes

Parameters:
unknown_002c -

getLang_id

public long getLang_id()
Returns language id

Returns:
lang_id

setLang_id

protected void setLang_id(long lang_id)
Sets language id

Parameters:
lang_id -

getSystem_uuid

public byte[] getSystem_uuid()
Returns system uuid

Returns:
system_uuid

setSystem_uuid

protected void setSystem_uuid(byte[] system_uuid)
Sets system uuid

Parameters:
system_uuid -

getUnknown_0044

public byte[] getUnknown_0044()
Returns 0044 unknown bytes

Returns:
unknown_0044

setUnknown_0044

protected void setUnknown_0044(byte[] unknown_0044)
Sets 0044 unknown bytes

Parameters:
unknown_0044 -

parse

public void parse(byte[] data,
                  ChmItspHeader chmItspHeader)
           throws TikaException
Description copied from interface: ChmAccessor
Parses chm accessor

Specified by:
parse in interface ChmAccessor<ChmItspHeader>
Parameters:
data - chm file
Throws:
TikaException

main

public static void main(String[] args)
Parameters:
args -


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.