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

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

public class ChmItsfHeader
extends Object
implements ChmAccessor<ChmItsfHeader>

The Header 0000: char[4] 'ITSF' 0004: DWORD 3 (Version number) 0008: DWORD Total header length, including header section table and following data. 000C: DWORD 1 (unknown) 0010: DWORD a timestamp 0014: DWORD Windows Language ID 0018: GUID {7C01FD10-7BAA-11D0-9E0C-00A0-C922-E6EC} 0028: GUID {7C01FD11-7BAA-11D0-9E0C-00A0-C922-E6EC} Note: a GUID is $10 bytes, arranged as 1 DWORD, 2 WORDs, and 8 BYTEs. 0000: QWORD Offset of section from beginning of file 0008: QWORD Length of section Following the header section table is 8 bytes of additional header data. In Version 2 files, this data is not there and the content section starts immediately after the directory. ://translated.by/you/microsoft-s-html-help-chm-format-incomplete/original /?show-translation-form=1

See Also:
Serialized Form

Constructor Summary
ChmItsfHeader()
           
 
Method Summary
 long getDataOffset()
          Returns data offset
 byte[] getDir_uuid()
          Returns directory uuid
 long getDirLen()
          Returns directory length
 long getDirOffset()
          Returns directory offset
 int getHeaderLen()
          Returns itsf header length
 long getLangId()
          Returns language ID
 long getLastModified()
          Returns last modified date of the chm file
 byte[] getSignature()
          Returns a signature of itsf header
 byte[] getStream_uuid()
          Returns stream uuid
 int getUnknown_000c()
          Returns unknown_00c value
 long getUnknownLen()
          Returns unknown length
 long getUnknownOffset()
          Returns unknown offset
 int getVersion()
          Returns itsf header version
static void main(String[] args)
           
 void parse(byte[] data, ChmItsfHeader chmItsfHeader)
          Parses chm accessor
protected  void setDataOffset(long data_offset)
          Sets data offset
protected  void setDir_uuid(byte[] dir_uuid)
          Sets directory uuid
protected  void setDirLen(long dir_len)
          Sets directory length
protected  void setDirOffset(long dir_offset)
          Sets directory offset
protected  void setHeaderLen(int header_len)
          Sets itsf header length
protected  void setLangId(long lang_id)
          Sets language_id
protected  void setLastModified(long last_modified)
          Sets last modified date of the chm file
protected  void setSignature(byte[] signature)
          Sets itsf header signature
protected  void setStream_uuid(byte[] stream_uuid)
          Sets stream uuid
protected  void setUnknown_000c(int unknown_000c)
          Sets unknown_00c
protected  void setUnknownLen(long unknown_len)
          Sets unknown length
protected  void setUnknownOffset(long unknown_offset)
          Sets unknown offset
protected  void setVersion(int version)
          Sets itsf version
 String toString()
          Prints the values of ChmfHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChmItsfHeader

public ChmItsfHeader()
Method Detail

toString

public String toString()
Prints the values of ChmfHeader

Overrides:
toString in class Object

getSignature

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

Returns:
itsf header

setSignature

protected void setSignature(byte[] signature)
Sets itsf header signature

Parameters:
signature -

getVersion

public int getVersion()
Returns itsf header version

Returns:
itsf version

setVersion

protected void setVersion(int version)
Sets itsf version

Parameters:
version -

getHeaderLen

public int getHeaderLen()
Returns itsf header length

Returns:
length

setHeaderLen

protected void setHeaderLen(int header_len)
Sets itsf header length

Parameters:
header_len -

getUnknown_000c

public int getUnknown_000c()
Returns unknown_00c value

Returns:
unknown_00c

setUnknown_000c

protected void setUnknown_000c(int unknown_000c)
Sets unknown_00c

Parameters:
unknown_000c -

getLastModified

public long getLastModified()
Returns last modified date of the chm file

Returns:
last modified date as long

setLastModified

protected void setLastModified(long last_modified)
Sets last modified date of the chm file

Parameters:
last_modified -

getLangId

public long getLangId()
Returns language ID

Returns:
language_id

setLangId

protected void setLangId(long lang_id)
Sets language_id

Parameters:
lang_id -

getDir_uuid

public byte[] getDir_uuid()
Returns directory uuid

Returns:
dir_uuid

setDir_uuid

protected void setDir_uuid(byte[] dir_uuid)
Sets directory uuid

Parameters:
dir_uuid -

getStream_uuid

public byte[] getStream_uuid()
Returns stream uuid

Returns:
stream_uuid

setStream_uuid

protected void setStream_uuid(byte[] stream_uuid)
Sets stream uuid

Parameters:
stream_uuid -

getUnknownOffset

public long getUnknownOffset()
Returns unknown offset

Returns:
unknown_offset

setUnknownOffset

protected void setUnknownOffset(long unknown_offset)
Sets unknown offset

Parameters:
unknown_offset -

getUnknownLen

public long getUnknownLen()
Returns unknown length

Returns:
unknown_length

setUnknownLen

protected void setUnknownLen(long unknown_len)
Sets unknown length

Parameters:
unknown_len -

getDirOffset

public long getDirOffset()
Returns directory offset

Returns:
directory_offset

setDirOffset

protected void setDirOffset(long dir_offset)
Sets directory offset

Parameters:
dir_offset -

getDirLen

public long getDirLen()
Returns directory length

Returns:
directory_offset

setDirLen

protected void setDirLen(long dir_len)
Sets directory length

Parameters:
dir_len -

getDataOffset

public long getDataOffset()
Returns data offset

Returns:
data_offset

setDataOffset

protected void setDataOffset(long data_offset)
Sets data offset

Parameters:
data_offset -

main

public static void main(String[] args)

parse

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

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


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