be.cardon.nativecall
Class NativeStructure

java.lang.Object
  extended by be.cardon.nativecall.NativeObject
      extended by be.cardon.nativecall.NativeStructure
Direct Known Subclasses:
Struct_CRYPTOAPI_BLOB, Struct_CTL_USAGE, StructCERT_CHAIN_CONTEXT, StructCERT_CHAIN_ELEMENT, StructCERT_CHAIN_PARA, StructCERT_CONTEXT, StructCERT_INFO, StructCERT_SIMPLE_CHAIN, StructCERT_TRUST_STATUS, StructCERT_USAGE_MATCH

public abstract class NativeStructure
extends NativeObject

Wrapper for a native structure.


Field Summary
 
Fields inherited from class be.cardon.nativecall.NativeObject
BYTE_SIZE, INT_SIZE, LLC
 
Constructor Summary
NativeStructure(int lengthInBytes, java.lang.Integer[] elementsSize, java.util.List<java.lang.Integer> relAddresses)
           
NativeStructure(int lengthInBytes, java.lang.Integer[] elementsSize, java.util.List<java.lang.Integer> relAddresses, int address)
           
 
Method Summary
protected  void checkStructSize()
           
 int getAddressOfElement(int elementIndex)
          the first index is zero !
 NativeObject getNativeObjectElement(int elementIndex)
           
protected  void getRelativeAddress(java.util.List<java.lang.Integer> relAddress)
           
protected  void initStruct(java.util.List<java.lang.Integer> relAddresses)
           
 
Methods inherited from class be.cardon.nativecall.NativeObject
finalize, getAddress, getLength, isReadOnly, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeStructure

public NativeStructure(int lengthInBytes,
                       java.lang.Integer[] elementsSize,
                       java.util.List<java.lang.Integer> relAddresses)
                throws NativeCallException
Throws:
NativeCallException

NativeStructure

public NativeStructure(int lengthInBytes,
                       java.lang.Integer[] elementsSize,
                       java.util.List<java.lang.Integer> relAddresses,
                       int address)
                throws NativeCallException
Throws:
NativeCallException
Method Detail

initStruct

protected final void initStruct(java.util.List<java.lang.Integer> relAddresses)
                         throws NativeCallException
Throws:
NativeCallException

checkStructSize

protected final void checkStructSize()
                              throws NativeCallException
Throws:
NativeCallException

getAddressOfElement

public final int getAddressOfElement(int elementIndex)
the first index is zero !


getNativeObjectElement

public final NativeObject getNativeObjectElement(int elementIndex)
                                          throws NativeCallException
Throws:
NativeCallException

getRelativeAddress

protected final void getRelativeAddress(java.util.List<java.lang.Integer> relAddress)