/** * This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array * read from a Word file). */ public CHPFormattedDiskPage( byte[] documentStream, int offset, CharIndexTranslator translator ) { super( documentStream, offset ); for ( int x = 0; x < _crun; x++ ) { int bytesStartAt = getStart( x ); int bytesEndAt = getEnd( x ); // int charStartAt = translator.getCharIndex( bytesStartAt ); // int charEndAt = translator.getCharIndex( bytesEndAt, charStartAt // ); for ( int[] range : translator.getCharIndexRanges( bytesStartAt, bytesEndAt ) ) { CHPX chpx = new CHPX( range[0], range[1], new SprmBuffer( getGrpprl( x ), 0 ) ); _chpxList.add( chpx ); } } }
/** * This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array * read from a Word file). */ public CHPFormattedDiskPage( byte[] documentStream, int offset, CharIndexTranslator translator ) { super( documentStream, offset ); for ( int x = 0; x < _crun; x++ ) { int bytesStartAt = getStart( x ); int bytesEndAt = getEnd( x ); // int charStartAt = translator.getCharIndex( bytesStartAt ); // int charEndAt = translator.getCharIndex( bytesEndAt, charStartAt // ); for ( int[] range : translator.getCharIndexRanges( bytesStartAt, bytesEndAt ) ) { CHPX chpx = new CHPX( range[0], range[1], new SprmBuffer( getGrpprl( x ), 0 ) ); _chpxList.add( chpx ); } } }