Monday, April 22, 2002 05:13 PM
Try creating a ByteArrayOutputStream wrapped by a DataOutputStream. Write whatever you want to the DataOutputStream, then get the byte array from the ByteArrayOutputStream and write it to the socket's OutputStream.
Alternatively, if you are just trying to write the Ascii representation of the string and a number, make a String out of them(ie. "Some String" + 10). Wrap a PrintStream or a PrintWriter around your socket OutputStream and write through there.