@littonj: Fix UDP output

Well OK, so my UDP optimization actually breaks under Java.  *Really* shoulda tested it; my apologies for the snafu.  Have a looksie here.