Many thanks marpet that helped me to move quite a bit. Just for code completeness for future users I provide a working example and how to define the data array that we want to populate.
source = ProductIO.readProduct(filename)
w = source.getSceneRasterWidth()
h = source.getSceneRasterHeight()
band = source.getBand('Amplitude_HH')
mask = band.readValidMask(0,0,w,h,np.zeros(shape=(w,h), dtype=np.uint8))
At this point mask is a two dimensional array w x h.
I tried to do the same thing to get the actual data
Band = ProductData.createInstance(np.zeros((w, h), np.float32))
band.readRasterData(0,0,w,h,Band)
for some reason it seamed that I needed to instantiate my empty array with the ProductData.createInstance method.
Now if I use Band.getElems() that returns a vector instead of an array. How can I retrieve the actual data array (or convert from the vector to the appropriate 2D array)?