Package org.apache.tika.parser.chm.core
Class ChmCommons
java.lang.Object
org.apache.tika.parser.chm.core.ChmCommons
Deprecated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.Represents entry types: uncompressed, compressedstatic enumDeprecated.Represents intel file states during decompressionstatic enumDeprecated.Represents lzx states: started decoding, not started decoding -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.Represents lzx block types in order to decompress differentlystatic final intDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertByteArrayNotNull(byte[] data) Deprecated.static byte[]copyOfRange(byte[] original, int from, int to) Deprecated.static byte[]getChmBlockSegment(byte[] data, ChmLzxcResetTable resetTable, int blockNumber, int lzxcBlockOffset, int lzxcBlockLength) Deprecated.static StringgetLanguage(long langID) Deprecated.Returns textual representation of LangIDstatic intgetWindowSize(int window) Deprecated.LZX supports window sizes of 2^15 (32Kb) through 2^21 (2Mb) Returns X, i.e 2^Xstatic booleanhasSkip(DirectoryListingEntry directoryListingEntry) Deprecated.Checks skippable patternsstatic intindexOf(byte[] text, byte[] pattern) Deprecated.Searches some pattern in byte[]static intindexOf(List<DirectoryListingEntry> list, String pattern) Deprecated.Searches for some pattern in the directory listing entry liststatic final intindexOfResetTableBlock(byte[] text, byte[] pattern) Deprecated.Returns an index of the reset tablestatic booleanDeprecated.static voidreverse(byte[] array) Deprecated.Reverses the order of given arraystatic voidDeprecated.Writes byte[][] to the file
-
Field Details
-
UNDEFINED
public static final int UNDEFINEDDeprecated.Represents lzx block types in order to decompress differently- See Also:
-
VERBATIM
public static final int VERBATIMDeprecated.- See Also:
-
ALIGNED_OFFSET
public static final int ALIGNED_OFFSETDeprecated.- See Also:
-
UNCOMPRESSED
public static final int UNCOMPRESSEDDeprecated.- See Also:
-
-
Method Details
-
assertByteArrayNotNull
Deprecated.- Throws:
TikaException
-
getWindowSize
public static int getWindowSize(int window) Deprecated.LZX supports window sizes of 2^15 (32Kb) through 2^21 (2Mb) Returns X, i.e 2^X- Parameters:
window- chmLzxControlData.getWindowSize()- Returns:
- window size
-
getChmBlockSegment
public static byte[] getChmBlockSegment(byte[] data, ChmLzxcResetTable resetTable, int blockNumber, int lzxcBlockOffset, int lzxcBlockLength) throws TikaException Deprecated.- Throws:
TikaException
-
getLanguage
Deprecated.Returns textual representation of LangID- Parameters:
langID-- Returns:
- language name
-
hasSkip
Deprecated.Checks skippable patterns- Parameters:
directoryListingEntry-- Returns:
- boolean
-
writeFile
Deprecated.Writes byte[][] to the file- Parameters:
buffer-fileToBeSaved- file name- Throws:
TikaException
-
reverse
public static void reverse(byte[] array) Deprecated.Reverses the order of given array- Parameters:
array-
-
indexOfResetTableBlock
public static final int indexOfResetTableBlock(byte[] text, byte[] pattern) throws ChmParsingException Deprecated.Returns an index of the reset table- Parameters:
text-pattern-- Returns:
- index of the reset table
- Throws:
ChmParsingException
-
indexOf
Deprecated.Searches some pattern in byte[]- Parameters:
text- byte[]pattern- byte[]- Returns:
- an index, if nothing found returns -1
- Throws:
ChmParsingException
-
indexOf
Deprecated.Searches for some pattern in the directory listing entry list- Parameters:
list-pattern-- Returns:
- an index, if nothing found returns -1
-
copyOfRange
Deprecated.- Throws:
TikaException
-
isEmpty
Deprecated.
-