Read an array back from the source, with the assumption
it has been written using DataOutput.put() or otherwise
prefixed with an integer representing the total number
of bytes within the array content. That's *bytes*, not
elements.
An array of the appropriate size is allocated either via
the provided delegate, or from the heap, populated and
returned to the caller. Casting the return value to an
appropriate type will adjust the number of elements as
required:
Read an array back from the source, with the assumption it has been written using DataOutput.put() or otherwise prefixed with an integer representing the total number of bytes within the array content. That's *bytes*, not elements.
An array of the appropriate size is allocated either via the provided delegate, or from the heap, populated and returned to the caller. Casting the return value to an appropriate type will adjust the number of elements as required: