java: use std::vector instead of std::valarray

<valarray> is useful if you need to perform mathematical operations on the
array.  That's not the case here so use <vector> which is the standard
container type for representing contiguous arrays.

Signed-off-by: Pekka Enberg <penberg@kernel.org>