1 2 17 18 19 package org.apache.poi.hssf.record; 20 21 import org.apache.poi.util.LittleEndian; 22 23 31 32 public class InterfaceEndRecord 33 extends Record 34 { 35 public final static short sid = 0xe2; 36 37 public InterfaceEndRecord() 38 { 39 } 40 41 48 49 public InterfaceEndRecord(short id, short size, byte [] data) 50 { 51 super(id, size, data); 52 } 53 54 62 63 public InterfaceEndRecord(short id, short size, byte [] data, int offset) 64 { 65 super(id, size, data, offset); 66 } 67 68 protected void validateSid(short id) 69 { 70 if (id != sid) 71 { 72 throw new RecordFormatException("NOT A INTERFACEEND RECORD"); 73 } 74 } 75 76 protected void fillFields(byte [] data, short size, int offset) 77 { 78 } 79 80 public String toString() 81 { 82 StringBuffer buffer = new StringBuffer (); 83 84 buffer.append("[INTERFACEEND]\n"); 85 buffer.append("[/INTERFACEEND]\n"); 86 return buffer.toString(); 87 } 88 89 public int serialize(int offset, byte [] data) 90 { 91 LittleEndian.putShort(data, 0 + offset, sid); 92 LittleEndian.putShort(data, 2 + offset, 93 (( short ) 0x00)); return getRecordSize(); 95 } 96 97 public int getRecordSize() 98 { 99 return 4; 100 } 101 102 public short getSid() 103 { 104 return this.sid; 105 } 106 } 107 | Popular Tags |