Assuming that only


int read()

is broken and that

int read(byte[]�b)

actually works, just slap a

BufferedInputStream(InputStream�in)

in front of it and the problem goes away (no need for workarounds).

Yves <[EMAIL PROTECTED]>

On Wednesday, April 2, 2003, at 06:34 AM, [EMAIL PROTECTED] wrote:

How do you distinguish between a 255 (0xff) data byte and an
end-of-stream (-1)?

good question.. I was thinking about using InputStream.available() but I don't
know how much that can be trusted. Luckily, 0xff is not registered value of any
of the control bytes, but it can occur in crypto.Util.readMPI()


do you have any suggestions?


_______________________________________________ devl mailing list [EMAIL PROTECTED] http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to