# getValueAsBinary method

Uint8List getValueAsBinary()

Gets the the data as a binary array.

return The data as a binary array. throws BiosealException An error has occurred during Bioseal Library execution.

## Implementation

    Uint8List getValueAsBinary() {
      Pointer<UnsignedChar> pValueAsBinary = nullptr;
      Pointer<Int> pValueAsBinarySize = calloc();
      pValueAsBinarySize[0] = -1;
      try {
        var err = biosealSDK.id3BiosealField_GetValueAsBinary(_pHandle.value, pValueAsBinary, pValueAsBinarySize);
        if (err == BiosealError.insufficientBuffer.value) {
          pValueAsBinary = calloc.allocate(pValueAsBinarySize.value);
          err = biosealSDK.id3BiosealField_GetValueAsBinary(_pHandle.value, pValueAsBinary, pValueAsBinarySize);
        }
        if (err != BiosealError.success.value) {
          throw BiosealException(err);
        }
        final vValueAsBinary = Uint8List.fromList(pValueAsBinary.cast<Uint8>().asTypedList(pValueAsBinarySize.value));
        return vValueAsBinary;
      } finally {
        calloc.free(pValueAsBinary);
        calloc.free(pValueAsBinarySize);
      }
    }