Package org.openntf.domino.nsfdata.structs.cd

Source Code of org.openntf.domino.nsfdata.structs.cd.CDLSOBJECT

package org.openntf.domino.nsfdata.structs.cd;

import java.nio.ByteBuffer;

import org.openntf.domino.nsfdata.structs.SIG;
import org.openntf.domino.nsfdata.structs.WSIG;

/**
* The CD record contains Lotus Script object code. (editods.h)
*
* @since Lotus Notes/Domino 4.6
*
*/
public class CDLSOBJECT extends CDRecord {

  static {
    addFixedUnsigned("CodeSize", Integer.class);
    addFixedArray("Reserved", Byte.class, 4);

    addVariableData("ObjectCode", "getCodeSize");
  }

  public static final int SIZE = getFixedStructSize();

  public CDLSOBJECT(final CDSignature cdSig) {
    super(new WSIG(cdSig, cdSig.getSize() + SIZE), ByteBuffer.wrap(new byte[SIZE]));
  }

  public CDLSOBJECT(final SIG signature, final ByteBuffer data) {
    super(signature, data);
  }

  public int getCodeSize() {
    return ((Long) getStructElement("CodeSize")).intValue();
  }

  public byte[] getReserved() {
    return (byte[]) getStructElement("Reserved");
  }

  public byte[] getObjectCode() {
    return (byte[]) getStructElement("ObjectCode");
  }
}
TOP

Related Classes of org.openntf.domino.nsfdata.structs.cd.CDLSOBJECT

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.