Help wanted on Client-Server
in
to be read into a variable. I've tried doing it using
String inputLine = in.readLine()
but it keeps throwing an IOException. I can't work out why.
try {
PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
System.out.println("The printwriter and bufferedreader have been set up.");
String inputLine, outputLine;
inputLine = in.readLine();
System.out.println(inputLine);
} catch (IOException e) {
System.out.println(e);
}
The serverSocket and socket have been set up properly as far as I can tell. It's just the above portion of code that seems to be causing a problem. My knowledge of Java is fairly basic at the moment, so any help would be greatly appreciated.

