In server, I have send a byte array to client through Java socket
byte[] message = ... ;
DataOutputStream dout = new DataOutputStream(client.getOutputStream
First, do not use DataOutputStream unless it’s really necessary. Second:
Socket socket = new Socket("host", port);
OutputStream socketOutputStream = socket.getOutputStream();
socketOutputStream.write(message);
Of course this lacks any error checking but this should get you going. The JDK API Javadoc is your friend and can help you a lot.