1 19 20 package jxl.write.biff; 21 22 import jxl.biff.Type; 23 import jxl.biff.IntegerHelper; 24 import jxl.biff.StringHelper; 25 import jxl.biff.WritableRecordData; 26 27 31 class FooterRecord extends WritableRecordData 32 { 33 36 private byte[] data; 37 40 private String footer; 41 42 47 public FooterRecord(String s) 48 { 49 super(Type.FOOTER); 50 51 footer = s; 52 } 53 54 55 60 public FooterRecord(FooterRecord fr) 61 { 62 super(Type.FOOTER); 63 64 footer = fr.footer; 65 } 66 67 72 public byte[] getData() 73 { 74 if (footer == null || footer.length() == 0) 75 { 76 data = new byte[0]; 77 return data; 78 } 79 80 data = new byte[footer.length() * 2 + 3]; 81 IntegerHelper.getTwoBytes(footer.length(), data, 0); 82 data[2] = (byte) 0x1; 83 84 StringHelper.getUnicodeBytes(footer, data, 3); 85 86 return data; 87 } 88 } 89 90 91 | Popular Tags |