|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tika.parser.chm.core.ChmCommons
public class ChmCommons
Nested Class Summary | |
---|---|
static class |
ChmCommons.EntryType
Represents entry types: uncompressed, compressed |
static class |
ChmCommons.IntelState
Represents intel file states during decompression |
static class |
ChmCommons.LzxState
Represents lzx states: started decoding, not started decoding |
Field Summary | |
---|---|
static int |
ALIGNED_OFFSET
|
static int |
UNCOMPRESSED
|
static int |
UNDEFINED
Represents lzx block types in order to decompress differently |
static int |
VERBATIM
|
Method Summary | |
---|---|
static void |
assertByteArrayNotNull(byte[] data)
|
static byte[] |
copyOfRange(byte[] original,
int from,
int to)
|
static byte[] |
getChmBlockSegment(byte[] data,
ChmLzxcResetTable resetTable,
int blockNumber,
int lzxcBlockOffset,
int lzxcBlockLength)
|
static java.lang.String |
getLanguage(long langID)
Returns textual representation of LangID |
static int |
getWindowSize(int window)
LZX supports window sizes of 2^15 (32Kb) through 2^21 (2Mb) Returns X, i.e 2^X |
static boolean |
hasSkip(DirectoryListingEntry directoryListingEntry)
Checks skippable patterns |
static int |
indexOf(byte[] text,
byte[] pattern)
Searches some pattern in byte[] |
static int |
indexOf(java.util.List<DirectoryListingEntry> list,
java.lang.String pattern)
Searches for some pattern in the directory listing entry list |
static int |
indexOfResetTableBlock(byte[] text,
byte[] pattern)
Returns an index of the reset table |
static boolean |
isEmpty(java.lang.String str)
|
static void |
main(java.lang.String[] args)
|
static void |
reverse(byte[] array)
Reverses the order of given array |
static void |
writeFile(byte[][] buffer,
java.lang.String fileToBeSaved)
Writes byte[][] to the file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNDEFINED
public static final int VERBATIM
public static final int ALIGNED_OFFSET
public static final int UNCOMPRESSED
Method Detail |
---|
public static void assertByteArrayNotNull(byte[] data) throws TikaException
TikaException
public static int getWindowSize(int window)
window
- chmLzxControlData.getWindowSize()
public static byte[] getChmBlockSegment(byte[] data, ChmLzxcResetTable resetTable, int blockNumber, int lzxcBlockOffset, int lzxcBlockLength) throws TikaException
TikaException
public static java.lang.String getLanguage(long langID)
langID
-
public static boolean hasSkip(DirectoryListingEntry directoryListingEntry)
directoryListingEntry
-
public static void writeFile(byte[][] buffer, java.lang.String fileToBeSaved) throws TikaException
buffer
- fileToBeSaved
- file name
TikaException
public static void reverse(byte[] array)
array
- public static final int indexOfResetTableBlock(byte[] text, byte[] pattern) throws ChmParsingException
text
- pattern
-
ChmParsingException
public static int indexOf(byte[] text, byte[] pattern) throws ChmParsingException
text
- byte[]pattern
- byte[]
ChmParsingException
public static int indexOf(java.util.List<DirectoryListingEntry> list, java.lang.String pattern)
list
- pattern
-
public static byte[] copyOfRange(byte[] original, int from, int to)
public static boolean isEmpty(java.lang.String str)
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |