Skip to main content

byte[] to PipeAdvertisement

1 reply [Last post]
hajduk
Offline
Joined: 2011-08-23
Points: 0

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.
larrynorth
Offline
Joined: 2011-08-30
Points: 0

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

L