Solved

Audio/video in xml

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…

776 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