Class ChmItsfHeader
java.lang.Object
org.apache.tika.parser.microsoft.chm.ChmItsfHeader
- All Implemented Interfaces:
- Serializable,- 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.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongReturns data offsetbyte[]Returns directory uuidlongReturns directory lengthlongReturns directory offsetintReturns itsf header lengthlongReturns language IDlongReturns last modified date of the chm filebyte[]Returns a signature of itsf headerbyte[]Returns stream uuidintReturns unknown_00c valuelongReturns unknown lengthlongReturns unknown offsetintReturns itsf header versionstatic voidvoidparse(byte[] data, ChmItsfHeader chmItsfHeader) Parses chm accessorprotected voidsetDataOffset(long data_offset) Sets data offsetprotected voidsetDir_uuid(byte[] dir_uuid) Sets directory uuidprotected voidsetDirLen(long dir_len) Sets directory lengthprotected voidsetDirOffset(long dir_offset) Sets directory offsetprotected voidsetHeaderLen(int header_len) Sets itsf header lengthprotected voidsetLangId(long lang_id) Sets language_idprotected voidsetLastModified(long last_modified) Sets last modified date of the chm fileprotected voidsetSignature(byte[] signature) Sets itsf header signatureprotected voidsetStream_uuid(byte[] stream_uuid) Sets stream uuidprotected voidsetUnknown_000c(int unknown_000c) Sets unknown_00cprotected voidsetUnknownLen(long unknown_len) Sets unknown lengthprotected voidsetUnknownOffset(long unknown_offset) Sets unknown offsetprotected voidsetVersion(int version) Sets itsf versiontoString()Prints the values of ChmfHeader
- 
Constructor Details- 
ChmItsfHeaderpublic ChmItsfHeader()
 
- 
- 
Method Details- 
main
- 
toStringPrints the values of ChmfHeader
- 
getSignaturepublic byte[] getSignature()Returns a signature of itsf header- Returns:
- itsf header
 
- 
setSignatureprotected void setSignature(byte[] signature) Sets itsf header signature- Parameters:
- signature-
 
- 
getVersionpublic int getVersion()Returns itsf header version- Returns:
- itsf version
 
- 
setVersionprotected void setVersion(int version) Sets itsf version- Parameters:
- version-
 
- 
getHeaderLenpublic int getHeaderLen()Returns itsf header length- Returns:
- length
 
- 
setHeaderLenprotected void setHeaderLen(int header_len) Sets itsf header length- Parameters:
- header_len-
 
- 
getUnknown_000cpublic int getUnknown_000c()Returns unknown_00c value- Returns:
- unknown_00c
 
- 
setUnknown_000cprotected void setUnknown_000c(int unknown_000c) Sets unknown_00c- Parameters:
- unknown_000c-
 
- 
getLastModifiedpublic long getLastModified()Returns last modified date of the chm file- Returns:
- last modified date as long
 
- 
setLastModifiedprotected void setLastModified(long last_modified) Sets last modified date of the chm file- Parameters:
- last_modified-
 
- 
getLangIdpublic long getLangId()Returns language ID- Returns:
- language_id
 
- 
setLangIdprotected void setLangId(long lang_id) Sets language_id- Parameters:
- lang_id-
 
- 
getDir_uuidpublic byte[] getDir_uuid()Returns directory uuid- Returns:
- dir_uuid
 
- 
setDir_uuidprotected void setDir_uuid(byte[] dir_uuid) Sets directory uuid- Parameters:
- dir_uuid-
 
- 
getStream_uuidpublic byte[] getStream_uuid()Returns stream uuid- Returns:
- stream_uuid
 
- 
setStream_uuidprotected void setStream_uuid(byte[] stream_uuid) Sets stream uuid- Parameters:
- stream_uuid-
 
- 
getUnknownOffsetpublic long getUnknownOffset()Returns unknown offset- Returns:
- unknown_offset
 
- 
setUnknownOffsetprotected void setUnknownOffset(long unknown_offset) Sets unknown offset- Parameters:
- unknown_offset-
 
- 
getUnknownLenpublic long getUnknownLen()Returns unknown length- Returns:
- unknown_length
 
- 
setUnknownLenprotected void setUnknownLen(long unknown_len) Sets unknown length- Parameters:
- unknown_len-
 
- 
getDirOffsetpublic long getDirOffset()Returns directory offset- Returns:
- directory_offset
 
- 
setDirOffsetprotected void setDirOffset(long dir_offset) Sets directory offset- Parameters:
- dir_offset-
 
- 
getDirLenpublic long getDirLen()Returns directory length- Returns:
- directory_offset
 
- 
setDirLenprotected void setDirLen(long dir_len) Sets directory length- Parameters:
- dir_len-
 
- 
getDataOffsetpublic long getDataOffset()Returns data offset- Returns:
- data_offset
 
- 
setDataOffsetprotected void setDataOffset(long data_offset) Sets data offset- Parameters:
- data_offset-
 
- 
parseDescription copied from interface:ChmAccessorParses chm accessor- Specified by:
- parsein interface- ChmAccessor<ChmItsfHeader>
- Parameters:
- data- chm file
- Throws:
- TikaException
 
 
-