Class BinaryDecoder

This class may read-ahead and buffer bytes from the source beyond what is
required to serve its read methods.
The number of unused bytes in the buffer can be accessed by
inputStream().remaining(), if the BinaryDecoder is not 'direct'.

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 Decoder.arrayNext() to find out the number of items in the next
block. The typical pattern for consuming an array looks like:

skipArray

Used for quickly skipping through an array. Note you can
either skip the entire array, or read the entire array (with
Decoder.readArrayStart()), but you can't mix the two on the
same array.
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:

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.

readMapStart

Reads and returns the size of the next block of map-entries.
Similar to Decoder.readArrayStart().
As an example, let's say you want to read a map of records,
the record consisting of an Long field and a Boolean field.
Your code would look something like this:

skipMap

Support for quickly skipping through a map similar to Decoder.skipArray().
As an example, let's say you want to skip a map of records,
the record consisting of an Long field and a Boolean field.
Your code would look something like this:

inputStream

Returns an InputStream that is aware of any buffering that
may occur in this BinaryDecoder. Readers that need to interleave decoding
Avro data with other reads must access this InputStream to do so unless
the implementation is 'direct' and does not read beyond the minimum bytes
necessary from the source.