read method

  1. @override
Future<ByteData> read()
override

Implementation

@override
Future<ByteData> read() async {
  try {
    return File(lcpl)
        .readAsBytes()
        .then((bytes) => ByteData.sublistView(bytes))
        .onError(
            (error, stackTrace) => throw LcpException.container.openFailed);
  } on Exception catch (e, stacktrace) {
    Fimber.e("LcplLicenseContainer.read ERROR",
        ex: e, stacktrace: stacktrace);
    throw LcpException.container.openFailed;
  }
}