Re: [Gamedevlists-brew] porting a database file from BREW to J2ME
Brought to you by:
vexxed72
|
From: Tom P. <bre...@ac...> - 2004-12-12 02:04:21
|
> Is there sneaky way to use the built-in zip decompressor that is required
> for decompressing the jar and png files? I was thinking of putting the data
> in a fake PNG 24-bit image, but I don't see a way to read it. It would be a
> shame to have to bring along a ZIP decompressor in my jar, just because they
> didn't expose it in the MIDP API.
Oh, have you not tried this method?
InputConnection conn = Connector.open("jar:/dictionary.jar", Connector.READ);
DataInputStream dis = conn.openDataInputStream();
Just kidding. It's annoying that they didn't expose an
inflate in MIDP2. They did add Image.getRGB, but that
still doesn't help because the values can be altered
to phone-safe colors.
You said you already have a decompressor, but you might
be interested in looking at this one:
http://www.java4ever.com/index.php?section=j2me&project=apime&menu=download&lang=en
> Given that some phones decompress the application at install time, as Tom P
> explains, it seems that I can't rely on the zip compression in the jar file
> alone.
Well, you could make a separate version for iDEN phones.
--t
|