I tried to ask this question earlier, but I was unclear in my question. http://stackoverflow.com/questions/3239740/java-bufferedreader-action-on-character
Here is my problem.. I have a BufferedReader set to read from a device. It is reading well. I have it set to
if (Status.reader.ready()) {
Lines = Status.reader.readLine();
}
if (Lines.contains(">")) {
log.level1("ready to send data")
}
Buffered reader does not report the >
until I've sent more data to the device. The problem is that when reader contains >
it is not reporting ready. It holds onto the >
until I input more data.
I tried the following and it returns nothing. It does not even return the log.level0()
Lines = ""
try {
Lines = Status.reader.readLine();
} catch (IOException e) {
Log.level0("Attempted to read blank line");
}
Here is the actual data sent:
^M^M01 02 F3^M00 01 F3 3E^M>
But BufferedReader ignores the >
until more data has been sent then get a result like this:
>0102
When I check the actual data from the device from the command prompt, it returns what I'd expect, the >
is present.
BufferedReader will not give me the >
. Is there some way I can check for this char otherwise?