read

Attempts to read multiple entries from the enumeration, up to length of
docs. Document numbers are stored in docs, and term
frequencies are stored in freqs. The freqs array must be as
long as the docs array.

Returns the number of entries read. Zero is only returned when the
stream has been exhausted.