/** * Constructor * * @param erd the escher record data */ public BlipStoreEntry(EscherRecordData erd) { super(erd); type = BlipType.getType(getInstance()); write = false; byte[] bytes = getBytes(); referenceCount = IntegerHelper.getInt(bytes[24], bytes[25], bytes[26], bytes[27]); }
/** * Constructor * * @param d the drawing * @exception IOException */ public BlipStoreEntry(Drawing d) throws IOException { super(EscherRecordType.BSE); type = BlipType.PNG; setVersion(2); setInstance(type.getValue()); byte[] imageData = d.getImageBytes(); imageDataLength = imageData.length; data = new byte[imageDataLength + IMAGE_DATA_OFFSET]; System.arraycopy(imageData, 0, data, IMAGE_DATA_OFFSET, imageDataLength); referenceCount = d.getReferenceCount(); write = true; }
/** * Constructor * * @param d the drawing * @exception IOException */ public BlipStoreEntry(Drawing d) throws IOException { super(EscherRecordType.BSE); type = BlipType.PNG; setVersion(2); setInstance(type.getValue()); byte[] imageData = d.getImageBytes(); imageDataLength = imageData.length; data = new byte[imageDataLength + IMAGE_DATA_OFFSET]; System.arraycopy(imageData, 0, data, IMAGE_DATA_OFFSET, imageDataLength); referenceCount = d.getReferenceCount(); write = true; }
/** * Constructor * * @param erd the escher record data */ public BlipStoreEntry(EscherRecordData erd) { super(erd); type = BlipType.getType(getInstance()); write = false; byte[] bytes = getBytes(); referenceCount = IntegerHelper.getInt(bytes[24], bytes[25], bytes[26], bytes[27]); }