java-dest: add new function flush. This is required for bulk methods.

Signed-off-by: Viktor Juhász <viktor.juhasz@balabit.com>