/** * Set things up, and find our more interesting children * * @param source the source data as a byte array. * @param start the start offset into the byte array. * @param len the length of the slice in the byte array. */ protected ExEmbed(final byte[] source, final int start, final int len) { // Grab the header _header = new byte[8]; System.arraycopy(source,start,_header,0,8); // Find our children _children = Record.findChildRecords(source,start+8,len-8); findInterestingChildren(); }
/** * Set things up, and find our more interesting children * * @param source the source data as a byte array. * @param start the start offset into the byte array. * @param len the length of the slice in the byte array. */ protected ExEmbed(byte[] source, int start, int len) { // Grab the header _header = new byte[8]; System.arraycopy(source,start,_header,0,8); // Find our children _children = Record.findChildRecords(source,start+8,len-8); findInterestingChildren(); }
/** * Create a new ExEmbed, with blank fields */ public ExEmbed() { _header = new byte[8]; _children = new Record[5]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); // Setup our child records final CString cs1 = new CString(); cs1.setOptions(0x1 << 4); final CString cs2 = new CString(); cs2.setOptions(0x2 << 4); final CString cs3 = new CString(); cs3.setOptions(0x3 << 4); _children[0] = new ExEmbedAtom(); _children[1] = new ExOleObjAtom(); _children[2] = cs1; _children[3] = cs2; _children[4] = cs3; findInterestingChildren(); }
/** * Create a new ExEmbed, with blank fields */ public ExEmbed() { _header = new byte[8]; _children = new Record[5]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); // Setup our child records CString cs1 = new CString(); cs1.setOptions(0x1 << 4); CString cs2 = new CString(); cs2.setOptions(0x2 << 4); CString cs3 = new CString(); cs3.setOptions(0x3 << 4); _children[0] = new ExEmbedAtom(); _children[1] = new ExOleObjAtom(); _children[2] = cs1; _children[3] = cs2; _children[4] = cs3; findInterestingChildren(); }