Solved

Audio/video in xml

Posted on 2006-07-18
4
286 Views
Last Modified: 2012-06-21
Hi ,
I would like to have an audio file or video to be part of an xml, i.e as base64 format or other not a link. I have some questions regarding it:
I have used the org.apache.commons.codec.binary.Base64 to encode an image, since the encoding returns a String I used it to encode the audio and it returned a string which is great, but how to decode it? since I dont know how to use the same library to decode I used the sun.misc to decode, but this seems to be only able to decode to an image (using BufferedImage), but I didnt an equivalent function for audio or video

questions and points:
1-what is the difference between the both libraries and which one do you advice to use? (50 ps)
2-code snippets or guidance to a decoder/encoder for video audio using base64 format?(350 ps)

thx
0
Comment
Question by:TheSilverBullet
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 17131385
You ought to stick to the commons library as the sun classes are not fully supported. What problems are you having decoding?
0
 

Author Comment

by:TheSilverBullet
ID: 17131402
do you have an example of decoding using the commons ?
0
 
LVL 9

Accepted Solution

by:
arioh earned 250 total points
ID: 17134094
you can use org.apache.soap.encoding.soapenc.Base64 class
it has simple encode and decode methods
source is here http://www.koders.com/java/fidDCD43FB87BC62F695BDB4A763921D092B6CB1E4B.aspx
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 150 total points
ID: 17144349
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven project error 5 48
couple of eclipse 5 27
xampp tool 12 31
servlet filter example 37 46
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now