1 2 17 18 package org.apache.poi.hdf.model.hdftypes; 19 20 import org.apache.poi.util.LittleEndian; 21 22 38 public class CHPFormattedDiskPage extends FormattedDiskPage 39 { 40 41 42 48 public CHPFormattedDiskPage(byte[] fkp) 49 { 50 super(fkp); 51 } 52 53 59 public byte[] getGrpprl(int index) 60 { 61 int chpxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, ((_crun + 1) * 4) + index); 62 63 if(chpxOffset == 0) 65 { 66 return new byte[0]; 67 68 } 69 70 int size = LittleEndian.getUnsignedByte(_fkp, chpxOffset); 71 72 byte[] chpx = new byte[size]; 73 74 System.arraycopy(_fkp, ++chpxOffset, chpx, 0, size); 75 return chpx; 76 } 77 } 78 | Popular Tags |