1 2 17 18 19 package org.apache.poi.hwpf.model; 20 21 import org.apache.poi.util.LittleEndian; 22 23 43 public abstract class FormattedDiskPage 44 { 45 protected byte[] _fkp; 46 protected int _crun; 47 protected int _offset; 48 49 50 public FormattedDiskPage() 51 { 52 53 } 54 55 58 public FormattedDiskPage(byte[] documentStream, int offset) 59 { 60 _crun = LittleEndian.getUnsignedByte(documentStream, offset + 511); 61 _fkp = documentStream; 62 _offset = offset; 63 } 64 69 protected int getStart(int index) 70 { 71 return LittleEndian.getInt(_fkp, _offset + (index * 4)); 72 } 73 78 protected int getEnd(int index) 79 { 80 return LittleEndian.getInt(_fkp, _offset + ((index + 1) * 4)); 81 } 82 86 public int size() 87 { 88 return _crun; 89 } 90 91 protected abstract byte[] getGrpprl(int index); 92 } 93 | Popular Tags |