1 19 20 package jxl.biff.drawing; 21 22 27 abstract class EscherRecord 28 { 29 32 protected EscherRecordData data; 34 35 38 protected final static int HEADER_LENGTH = 8; 39 40 45 protected EscherRecord(EscherRecordData erd) 46 { 47 data = erd; 48 } 49 50 55 protected EscherRecord(EscherRecordType type) 56 { 57 data = new EscherRecordData(type); 58 } 59 60 65 protected void setContainer(boolean cont) 66 { 67 data.setContainer(cont); 68 } 69 70 75 public int getLength() 76 { 77 return data.getLength() + HEADER_LENGTH; 78 } 79 80 85 protected final EscherStream getEscherStream() 86 { 87 return data.getEscherStream(); 88 } 89 90 95 protected final int getPos() 96 { 97 return data.getPos(); 98 } 99 100 105 protected final int getInstance() 106 { 107 return data.getInstance(); 108 } 109 110 115 protected final void setInstance(int i) 116 { 117 data.setInstance(i); 118 } 119 120 125 protected final void setVersion (int v) 126 { 127 data.setVersion(v); 128 } 129 130 135 public EscherRecordType getType() 136 { 137 return data.getType(); 138 } 139 140 146 abstract byte[] getData(); 147 148 152 final byte[] setHeaderData(byte[] d) 153 { 154 return data.setHeaderData(d); 155 } 156 157 162 byte[] getBytes() 163 { 164 return data.getBytes(); 165 } 166 167 172 protected int getStreamLength() 173 { 174 return data.getStreamLength(); 175 } 176 } 177 | Popular Tags |