1 2 17 18 19 20 package org.apache.poi.hssf.record; 21 22 23 24 import org.apache.poi.util.*; 25 26 33 public class PlotAreaRecord 34 extends Record 35 { 36 public final static short sid = 0x1035; 37 38 39 public PlotAreaRecord() 40 { 41 42 } 43 44 52 53 public PlotAreaRecord(short id, short size, byte [] data) 54 { 55 super(id, size, data); 56 57 } 58 59 68 69 public PlotAreaRecord(short id, short size, byte [] data, int offset) 70 { 71 super(id, size, data, offset); 72 73 } 74 75 80 protected void validateSid(short id) 81 { 82 if (id != sid) 83 { 84 throw new RecordFormatException("Not a PlotArea record"); 85 } 86 } 87 88 protected void fillFields(byte [] data, short size, int offset) 89 { 90 91 int pos = 0; 92 93 } 94 95 public String toString() 96 { 97 StringBuffer buffer = new StringBuffer (); 98 99 buffer.append("[PLOTAREA]\n"); 100 101 buffer.append("[/PLOTAREA]\n"); 102 return buffer.toString(); 103 } 104 105 public int serialize(int offset, byte[] data) 106 { 107 int pos = 0; 108 109 LittleEndian.putShort(data, 0 + offset, sid); 110 LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4)); 111 112 113 return getRecordSize(); 114 } 115 116 119 public int getRecordSize() 120 { 121 return 4 ; 122 } 123 124 public short getSid() 125 { 126 return this.sid; 127 } 128 129 public Object clone() { 130 PlotAreaRecord rec = new PlotAreaRecord(); 131 132 return rec; 133 } 134 135 136 137 138 139 } 141 142 143 144 | Popular Tags |