public class IPReadAheadBuffer
extends java.lang.Object
A (very primitive) "peekable" byte (not char!) buffer for an InputStream (supposedly from a socket).
Contrary to BufferedReader, this operates on bytes, not on characters.
It allows "peeks", i.e. reading bytes into an array without removing them from the buffer.
This is so that the "C" recv function can actually peek at the content of the InputStream.
This is not a real buffer in the sense that it would read more bytes than requested in one go to make reading more
efficient.
Implementation note : the buffer is discarded by setting the empty flag to true.
Note for future versions : could reuse existing "empty" buffer if possible, use pointers to mark start/stop