HDF5 opaque datatype and chunked dataset

Hi folks,

   I'm trying to write 1d array of bytes to dataset, the bytes could
represent anything image, video or audio and the size of the array is
unknown until the stream ends also the size of the array could be huge
therefore i need to read it in chunks. I found similar post [1] but after
trying the posted examples with Java API I end with nothing except
mysterious exceptions.

is that possible with HDF5? i'd really appreciate any help or examples to
understand the opaque datatype and HDF5 chunking concepts.

Mina R Waheeb

PS: HDF5 version 1.8.6