A
AndrewTK
Hi,
I am trying to write an input stream that also caters for the concept
of "line"
My class uses a BufferedInputStream for the actual reading, and I add,
by extending, a readLine() method
I run into a problem when trying to read bytes: (I have code at
http://www.dcs.st-and.ac.uk/~atk1/java/BufferedStreamReader.java)
1/ I read bytes into a buffer byte array 'minibuff'
2/ I iterate over each byte and check for a CR, LF, or CRLF pair
Before I enter the iteration loop, it is possible to print out the
input received. Thereafter, the bytes don't appear to EXIST... The
printBinaryByte() method I provide works before the for loop is
entered, but disappears afterwards.
I don't really know how to explain what I mean by disappears... nothing
prints when your try to print the byte, and binary comparison yeilds
nothing at all either... nothing prints to nowhere.
I am very confused.
I am trying to write an input stream that also caters for the concept
of "line"
My class uses a BufferedInputStream for the actual reading, and I add,
by extending, a readLine() method
I run into a problem when trying to read bytes: (I have code at
http://www.dcs.st-and.ac.uk/~atk1/java/BufferedStreamReader.java)
1/ I read bytes into a buffer byte array 'minibuff'
2/ I iterate over each byte and check for a CR, LF, or CRLF pair
Before I enter the iteration loop, it is possible to print out the
input received. Thereafter, the bytes don't appear to EXIST... The
printBinaryByte() method I provide works before the for loop is
entered, but disappears afterwards.
I don't really know how to explain what I mean by disappears... nothing
prints when your try to print the byte, and binary comparison yeilds
nothing at all either... nothing prints to nowhere.
I am very confused.