Read a .jar file from Midlet

Hi ,

I am developing a Karaoke Application.

I have a client program which ,first downloads the "midi" file and then downloads the lyrics highlighting logic (text) file. And then play the song according to the logic.

But what i want to do is, Download a single file which will contain both the text file and midi file.Is it possible to do this ? If so how ? (can we read a jar file from midlet ?)

Or is there any alternative for this.

Thanx in advance.

[488 byte] By [icebreakera] at [2007-11-27 7:48:53]
# 1

Make a litte desktop program for put in only one file midi and lirycs: .kar file .

Then make a class in j2me that read a .kar file by using a special separator that permit you to read first the midfile data then lyrics data.

the logic is similiar to BAMFS

http://supremej2me.bambalam.se/guides/optimization-tools/bamfs/

You can store this file into jar and read it by using this.getClass.getResourceAsStream("/filename.kar");

or download it by internet connection..

PeppeMEa at 2007-7-12 19:29:47 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Why are u thinking of downloading a single file? Well u can try to do it with a jar and try to retrieve that, but I don't think that will really work.

As a work around, u can write a server side program say a servlet that will first send the contents of the txt file using DataOutput.writeUTF(String s)/DataOutput.writeBytes(String s)

then send that midi file and retrieve those in the midlet accordingly.

Hope this works.

Regds,

SD

Message was edited by:

find_suvro@SDN

find_suvro@SDNa at 2007-7-12 19:29:47 > top of Java-index,Java Mobility Forums,Java ME Technologies...