Java message addOutputs method