getData method
Gets the the data of the VDS as a binary array.
return The data of the VDS as a binary array. throws BiosealException An error has occurred during Bioseal Library execution.
Implementation
Uint8List getData() {
Pointer<UnsignedChar> pData = nullptr;
Pointer<Int> pDataSize = calloc();
pDataSize[0] = -1;
try {
var err = biosealSDK.id3Bioseal_GetData(_pHandle.value, pData, pDataSize);
if (err == BiosealError.insufficientBuffer.value) {
pData = calloc.allocate(pDataSize.value);
err = biosealSDK.id3Bioseal_GetData(_pHandle.value, pData, pDataSize);
}
if (err != BiosealError.success.value) {
throw BiosealException(err);
}
final vData = Uint8List.fromList(pData.cast<Uint8>().asTypedList(pDataSize.value));
return vData;
} finally {
calloc.free(pData);
calloc.free(pDataSize);
}
}