How do I know that byte of stream is finished?
I am new to java , I have been listening streams form a remote device that is sending packets in tcp/ip , I am able to catch the packets but I dont know that when the packets are finished . As we know that in chatting application server or client just waits for an end of file or any termination character to terminate form the loop as in bufferedReader.readLine(); method , but how to get the total number of bytes and know that packets are ended and no more packets will arrive ????
Please help me in this I am stuck in this problem
Thank you !