Skip to main content

byte[] to PipeAdvertisement

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-08-23

Hello everybody!

I need to send advertisement using multicast, so I need to convert it to byte first. I do it as follows...

Document doc = pipeAdv.getDocument(MimeMediaType.XMLUTF8);

InputStream is = doc.getStream();

byte[] bajte = new byte[1024];

it probably works, but I have no idea how to do go back to PipeAdvertisement. Can somebody give me some advise?

And I think it is also worth to mention, that both class PipeAdvertisement and Document (LiteXMLDocument) are not serializable.

thanx in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-08-30

you need to extend Advertisement and implement serializable to make it work. Check out AdvertisementTutorial.