Class ChmAssert
- java.lang.Object
- 
- org.apache.tika.parser.microsoft.chm.ChmAssert
 
- 
 public class ChmAssert extends Object Contains chm extractor assertions
- 
- 
Constructor SummaryConstructors Constructor Description ChmAssert()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertByteArrayNotNull(byte[] data)Checks if byte[] is not nullstatic voidassertChmAccessorNotNull(ChmAccessor<?> chmAccessor)Checks if ChmAccessor is not null In case of null throws exceptionstatic voidassertChmAccessorParameters(byte[] data, ChmAccessor<?> chmAccessor, int count)Checks validity of ChmAccessor parametersstatic voidassertChmBlockSegment(byte[] data, ChmLzxcResetTable resetTable, int blockNumber, int lzxcBlockOffset, int lzxcBlockLength)Checks a validity of the chmBlockSegment parametersstatic voidassertCopyingDataIndex(int index, int dataLength)static voidassertDirectoryListingEntry(int name_length, String name, ChmCommons.EntryType entryType, int offset, int length)Checks validity of the DirectoryListingEntry's parameters In case of invalid parameter(s) throws an exceptionstatic voidassertInputStreamNotNull(InputStream is)Checks if InputStream is not nullstatic voidassertPositiveInt(int param)Checks if int param is greater than zero In case param <= 0 throws an exception
 
- 
- 
- 
Method Detail- 
assertChmBlockSegmentpublic static final void assertChmBlockSegment(byte[] data, ChmLzxcResetTable resetTable, int blockNumber, int lzxcBlockOffset, int lzxcBlockLength) throws TikaExceptionChecks a validity of the chmBlockSegment parameters- Parameters:
- data- byte[]
- resetTable- ChmLzxcResetTable
- blockNumber- int
- lzxcBlockOffset- int
- lzxcBlockLength- int
- Throws:
- TikaException
 
 - 
assertInputStreamNotNullpublic static final void assertInputStreamNotNull(InputStream is) throws IOException Checks if InputStream is not null- Parameters:
- is- InputStream
- Throws:
- ChmParsingException
- IOException
 
 - 
assertChmAccessorParameterspublic static final void assertChmAccessorParameters(byte[] data, ChmAccessor<?> chmAccessor, int count) throws ChmParsingExceptionChecks validity of ChmAccessor parameters- Parameters:
- data-
- chmAccessor-
- count-
- Throws:
- ChmParsingException
 
 - 
assertByteArrayNotNullpublic static final void assertByteArrayNotNull(byte[] data) throws ChmParsingExceptionChecks if byte[] is not null- Parameters:
- data-
- Throws:
- ChmParsingException
 
 - 
assertChmAccessorNotNullpublic static final void assertChmAccessorNotNull(ChmAccessor<?> chmAccessor) throws ChmParsingException Checks if ChmAccessor is not null In case of null throws exception- Parameters:
- chmAccessor-
- Throws:
- ChmParsingException
 
 - 
assertDirectoryListingEntrypublic static final void assertDirectoryListingEntry(int name_length, String name, ChmCommons.EntryType entryType, int offset, int length) throws ChmParsingExceptionChecks validity of the DirectoryListingEntry's parameters In case of invalid parameter(s) throws an exception- Parameters:
- name_length- length of the chm entry name
- name- chm entry name
- entryType- EntryType
- offset-
- length-
- Throws:
- ChmParsingException
 
 - 
assertCopyingDataIndexpublic static void assertCopyingDataIndex(int index, int dataLength) throws ChmParsingException- Throws:
- ChmParsingException
 
 - 
assertPositiveIntpublic static void assertPositiveInt(int param) throws ChmParsingExceptionChecks if int param is greater than zero In case param <= 0 throws an exception- Parameters:
- param-
- Throws:
- ChmParsingException
 
 
- 
 
-