improving java version of dpal: iterator, result, data buffer