I am trying to read from a socket until I reach “\0” (null). This is the terminator used by Flash. I had this problem also, in C(++).
while ((inputLine = in.readLine()) != null) {
outputLine = kkp.processInput(inputLine);
out.println(outputLine);
if (outputLine.equals("Bye."))
break;
}
This example code from the Oracle Java documentation will not work in my situation because “readLine” will only count \r\n and such. I’m not sure how to read into a buffer, I have some ideas as to how I’d do it but I’m not sure how to implement.
You can do