chmItspHeader.parse(ChmCommons.copyOfRange(data,
(int) chmItsfHeader.getDirOffset(),
(int) chmItsfHeader.getDirOffset()
+ ChmConstants.CHM_ITSP_V1_LEN), chmItspHeader);
/* Creating instance of ChmDirListingContainer */
ChmDirectoryListingSet chmDirListCont = new ChmDirectoryListingSet(
data, chmItsfHeader, chmItspHeader);
int indexOfControlData = chmDirListCont.getControlDataIndex();
int indexOfResetTable = ChmCommons.indexOfResetTableBlock(data,
ChmConstants.LZXC.getBytes());
byte[] dir_chunk = null;
if (indexOfResetTable > 0) {
// dir_chunk = Arrays.copyOfRange( data, indexOfResetTable,
// indexOfResetTable
// +
// chmDirListCont.getDirectoryListingEntryList().get(indexOfControlData).getLength());
dir_chunk = ChmCommons.copyOfRange(data, indexOfResetTable,
indexOfResetTable
+ chmDirListCont.getDirectoryListingEntryList()
.get(indexOfControlData).getLength());
}
/* Creates and parses control block */
ChmLzxcControlData chmLzxcControlData = new ChmLzxcControlData();
chmLzxcControlData.parse(dir_chunk, chmLzxcControlData);
indexOfResetTable = chmDirListCont.getResetTableIndex();
chmLzxcResetTable = new ChmLzxcResetTable();
int startIndex = (int) chmDirListCont.getDataOffset()
+ chmDirListCont.getDirectoryListingEntryList()
.get(indexOfResetTable).getOffset();
ChmAssert.assertCopyingDataIndex(startIndex, data.length);
// dir_chunk = Arrays.copyOfRange(data, startIndex, startIndex
// +
// chmDirListCont.getDirectoryListingEntryList().get(indexOfResetTable).getLength());
dir_chunk = ChmCommons.copyOfRange(
data,
startIndex,
startIndex
+ chmDirListCont.getDirectoryListingEntryList()
.get(indexOfResetTable).getLength());
chmLzxcResetTable.parse(dir_chunk, chmLzxcResetTable);
}