Function Decoder.readArrayStart

Reads and returns the size of the first block of an array. If this method returns non-zero, then the caller should read the indicated number of items, and then call [arrayNext] to find out the number of items in the next block. The typical pattern for consuming an array looks like:

abstract ulong readArrayStart() @safe;
for(long i = in.readArrayStart(); i != 0; i = in.arrayNext()) {
  for (long j = 0; j < i; j++) {
    read next element of the array;
  }
}

Throws

AvroTypeException If this is a stateful reader and array is not the type of the next value to be read