Hi Priya,
Methinks what u actually need is a RTP(Realtime Transmission Protocol) which nicely wraps the said functionality by Michael. This is what is used in Voice chat programs and in VoIP applications. You could take a look at JMF
(
Java Media Framework) which contains packages for RTP.
Hope this pointer helps.
Rgds
Muthukumaran