I want to sent a .dat file from the server to the client and have the client put it in an array and display it. My problem is on the server end but i jus dont know what to do. can anyoner please help me, here's what i've got so far:
Scanner FileOut = new Scanner(new File("test.dat" ));
byte[] dataOut = new byte[1024];
dataOut = FileOut.toStrin g().getBytes();
DatagramPacket outPacket = new DatagramPacket (dataOut, dataOut.length, group, clientPort);
socket.send(out Packet);
System.out.prin tln("File sent to client");
whats missing/ where m i going wrong.
it's UDP by the way
Scanner FileOut = new Scanner(new File("test.dat" ));
byte[] dataOut = new byte[1024];
dataOut = FileOut.toStrin g().getBytes();
DatagramPacket outPacket = new DatagramPacket (dataOut, dataOut.length, group, clientPort);
socket.send(out Packet);
System.out.prin tln("File sent to client");
whats missing/ where m i going wrong.
it's UDP by the way
Comment