hi,
I don't think that a ByteArrayInputStream can solve your problem, a ByteArrayInputStream simply reads bytes out of an byte-array. It has nothing to do with a socket.
If you have a look at SocketInputStream you will see that there is a method called "available()" which gives you the number of bytes you can read without blocking.
Generally the
Java input streams are all blocking (up to jdk 1.4), you can try to use the new input streams of 1.4 (java.nio) to solve your problem.
Peter
SCJP 1.2, SCJD, SCEA, IBM 484, Weblogic 7