fromByteArrayStream static method

Future<MenuItem> fromByteArrayStream(
  1. ByteStream in_
)

Reads objects from ByteArrayInputStream and stores them in map. @param in ByteArrayInputStream to be used @return the deserialized Storable String @throws IOException if value cannot be read

Implementation

static Future<MenuItem> fromByteArrayStream(ByteStream in_) async {
  SerializerHelper.castTest(
      'MenuItem', serialVersionUID, await SerializerHelper.readLong(in_), 1);
  final Node menu = await NodeImpl.fromByteArrayStream(in_);
  final GeigerUrl url = await GeigerUrl.fromByteArrayStream(in_);
  final bool mEnabled = await SerializerHelper.readInt(in_) == 1;
  SerializerHelper.castTest(
      'MenuItem', serialVersionUID, await SerializerHelper.readLong(in_), 2);
  return MenuItem(menu, url, mEnabled);
}