Solved

Audio/video in xml

Posted on 2006-07-18
4
283 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

762 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

24 Experts available now in Live!

Get 1:1 Help Now