1 19 20 package jxl.read.biff; 21 22 import common.Logger; 23 24 import jxl.WorkbookSettings; 25 import jxl.biff.StringHelper; 26 import jxl.biff.IntegerHelper; 27 import jxl.biff.RecordData; 28 29 32 public class HeaderRecord extends RecordData 33 { 34 37 private static Logger logger = Logger.getLogger(HeaderRecord.class); 38 39 42 private String header; 43 44 47 private static class Biff7 {}; 48 public static Biff7 biff7 = new Biff7(); 49 50 56 HeaderRecord(Record t, WorkbookSettings ws) 57 { 58 super(t); 59 byte[] data = getRecord().getData(); 60 61 if (data.length == 0) 62 { 63 return; 64 } 65 66 int chars = IntegerHelper.getInt(data[0], data[1]); 67 68 boolean unicode = data[2] == 1; 69 70 if (unicode) 71 { 72 header = StringHelper.getUnicodeString(data, chars, 3); 73 } 74 else 75 { 76 header = StringHelper.getString(data, chars, 3, ws); 77 } 78 } 79 80 87 HeaderRecord(Record t, WorkbookSettings ws, Biff7 dummy) 88 { 89 super(t); 90 byte[] data = getRecord().getData(); 91 92 if (data.length == 0) 93 { 94 return; 95 } 96 97 int chars = data[0]; 98 header = StringHelper.getString(data, chars, 1, ws); 99 } 100 101 106 String getHeader() 107 { 108 return header; 109 } 110 } 111 | Popular Tags |