What is the best way to declare a unsigned char* field within a struct? I tried with a nio.Buffer, but then I got the following error: Can't autogenerate a direct buffer on memory read
public static class ASN1_STRING extends Structure {
public int length;
public int type;
/** C type : unsigned char* */
public Buffer data;
/**
* The value of the following field depends on the type being<br>
* held. It is mostly being used for BIT_STRING so if the<br>
* input data has a non-zero 'unused bits' value, it will be<br>
* handled correctly
*/
public int flags;
public ASN1_STRING() {
super();
}
protected List<?> getFieldOrder() {
return Arrays.asList("length", "type", "data", "flags");
}
public ASN1_STRING(Pointer peer) {
super(peer);
}
public static class ByReference extends ASN1_STRING implements
Structure.ByReference {
};