From my client class I'll send strings one for the file name, one for the contents.
On the server, how do I make a file from the strings I've received from the client?
Client Class:
String theFile = "TextDoc.txt";
String theFileContent = "text inside TextDoc";
sendToServer.writeBytes(theFile +"\n");
sendToServer.writeBytes(theFileContent);
Server Class:
BufferedReader reFromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String theFileFrCl = reFromClient.readLine();
String theFileCtFrCl = reFromClient.readLine();
How can I make a file from what the client has sent? I'm not too sure how to append the content to TextDoc.
Martyn.