use "stream writing" for DH.writeCommandResult() method