Function Decoder.skipArray

Used for quickly skipping through an array. Note you can either skip the entire array, or read the entire array (with [readArrayStart]), but you can't mix the two on the same array.

abstract long skipArray() @safe;

This method will skip through as many items as it can, all of them if possible. It will return zero if there are no more items to skip through, or an item count if it needs the client's help in skipping. The typical usage pattern is:

for (long i = in.skipArray(); i != 0; i = i.skipArray()) {
  for (long j = 0; j < i; j++) {
    read and discard the next element of the array;
  }
}

Note that this method can automatically skip through items if a byte-count is found in the underlying data, or if a schema has been provided to the implementation, but otherwise the client will have to skip through items itself.

Throws

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