1 19 20 package jxl.write.biff; 21 22 import jxl.biff.Type; 23 import jxl.biff.WritableRecordData; 24 import jxl.biff.DValParser; 25 26 29 class DataValidityListRecord extends WritableRecordData 30 { 31 34 private byte[] data; 35 36 39 private DValParser dvalParser; 40 41 46 DataValidityListRecord(jxl.read.biff.DataValidityListRecord dvlr) 47 { 48 super(Type.DVAL); 49 50 data = dvlr.getData(); 51 } 52 53 58 DataValidityListRecord(DataValidityListRecord dvlr) 59 { 60 super(Type.DVAL); 61 62 data = new byte[dvlr.data.length]; 63 System.arraycopy(dvlr.data, 0, data, 0, data.length); 64 } 65 66 71 public byte[] getData() 72 { 73 if (dvalParser == null) 74 { 75 return data; 76 } 77 78 return dvalParser.getData(); 79 } 80 81 85 void dvRemoved() 86 { 87 if (dvalParser == null) 88 { 89 dvalParser = new DValParser(data); 90 } 91 92 dvalParser.dvRemoved(); 93 } 94 95 100 public boolean hasDVRecords() 101 { 102 if (dvalParser == null) 103 { 104 return true; 105 } 106 107 return dvalParser.getNumberOfDVRecords() > 0; 108 } 109 110 } 111 | Popular Tags |