MulticastSocket works with datagram packets, not streams. The reason is because the underlying protocol, UDP, does not guarantee any of these packets to arrive, or for them to arrive in the order they were sent.
You can create a new InputStream sub class around the MulticastSocket that reads the packets and let its read methods return the data from these packets. That's not going to be easy, for two reasons:
1) you will need two threads - one for receiving packets and one for reading the data from them. You'll need to cache the received packets. If you try to do it from one
thread your chances of missing a packet will increase if the reading code is not fast enough.
2) how do you detect the end of the stream? Receiving a packet doesn't return null, -1 or anything else to make a distinction to find out there won't be any more packets.