Search in sources :

Example 6 with ChmItsfHeader

use of org.apache.tika.parser.chm.accessor.ChmItsfHeader in project tika by apache.

the class TestChmItspHeader method setUp.

@Before
public void setUp() throws Exception {
    byte[] data = TestParameters.chmData;
    ChmItsfHeader chmItsfHeader = new ChmItsfHeader();
    // chmItsfHeader.parse(Arrays.copyOfRange(data, 0,
    // ChmConstants.CHM_ITSF_V3_LEN - 1), chmItsfHeader);
    chmItsfHeader.parse(ChmCommons.copyOfRange(data, 0, ChmConstants.CHM_ITSF_V3_LEN - 1), chmItsfHeader);
    chmItspHeader = new ChmItspHeader();
    // chmItspHeader.parse(Arrays.copyOfRange( data, (int)
    // chmItsfHeader.getDirOffset(),
    // (int) chmItsfHeader.getDirOffset()
    // + ChmConstants.CHM_ITSP_V1_LEN), chmItspHeader);
    chmItspHeader.parse(ChmCommons.copyOfRange(data, (int) chmItsfHeader.getDirOffset(), (int) chmItsfHeader.getDirOffset() + ChmConstants.CHM_ITSP_V1_LEN), chmItspHeader);
}
Also used : ChmItsfHeader(org.apache.tika.parser.chm.accessor.ChmItsfHeader) ChmItspHeader(org.apache.tika.parser.chm.accessor.ChmItspHeader) Before(org.junit.Before)

Aggregations

ChmItsfHeader (org.apache.tika.parser.chm.accessor.ChmItsfHeader)6 Before (org.junit.Before)6 ChmItspHeader (org.apache.tika.parser.chm.accessor.ChmItspHeader)5 ChmDirectoryListingSet (org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet)4 ChmLzxcControlData (org.apache.tika.parser.chm.accessor.ChmLzxcControlData)4 ChmLzxcResetTable (org.apache.tika.parser.chm.accessor.ChmLzxcResetTable)2