1 19 20 package jxl.read.biff; 21 22 import jxl.biff.IntegerHelper; 23 import jxl.biff.RecordData; 24 25 29 public class BOFRecord extends RecordData 30 { 31 34 private static final int Biff8 = 0x600; 35 38 private static final int Biff7 = 0x500; 39 42 private static final int WorkbookGlobals = 0x5; 43 46 private static final int Worksheet = 0x10; 47 50 private static final int Chart = 0x20; 51 54 private static final int MacroSheet = 0x40; 55 56 59 private int version; 60 63 private int substreamType; 64 65 70 BOFRecord(Record t) 71 { 72 super(t); 73 byte[] data = getRecord().getData(); 74 version = IntegerHelper.getInt(data[0], data[1]); 75 substreamType = IntegerHelper.getInt(data[2], data[3]); 76 } 77 78 83 public boolean isBiff8() 84 { 85 return version == Biff8; 86 } 87 88 93 public boolean isBiff7() 94 { 95 return version == Biff7; 96 } 97 98 99 106 boolean isWorkbookGlobals() 107 { 108 return substreamType == WorkbookGlobals; 109 } 110 111 117 public boolean isWorksheet() 118 { 119 return substreamType == Worksheet; 120 } 121 122 128 public boolean isMacroSheet() 129 { 130 return substreamType == MacroSheet; 131 } 132 133 139 public boolean isChart() 140 { 141 return substreamType == Chart; 142 } 143 144 149 int getLength() 150 { 151 return getRecord().getLength(); 152 } 153 154 } 155 156 157 158 159 160 161 162 163 164 | Popular Tags |