On Tue, Oct 9, 2012 at 8:08 AM, Jack Punt <
theg...@gmail.com> wrote:
> For example: CodedInputStream.newInstance("AAAAA".getBytes(), 5,5).isAtEnd()
> --> false [when obviously the buffer is 'empty' at this point]
> and readBytes() will likewise expect to find more bytes than are actually in
> the byte[]
The convention elsewhere is generally that the second (length)
parameter is a count, not an end index - so your example claims that
bytes 5-9 (inclusive) should be used (and you should be providing an
array of length >= 10). See e.g. the ByteArrayInputStream ctor.
Oliver