Function BinaryDecoder.doReadItemCount

Returns the number of items to follow in the current array or map. Returns 0 if there are no more items in the current array and the array/map has ended. Arrays are encoded as a series of blocks. Each block consists of a long count value, followed by that many array items. A block with count zero indicates the end of the array. If a block's count is negative, its absolute value is used, and the count is followed immediately by a long block size indicating the number of bytes in the block.

size_t doReadItemCount();

Throws

IOException If the first byte cannot be read for any reason other than the end of the file, if the input stream has been closed, or if some other I/O error occurs.