BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 07-18-2007, 08:18 AM   #1 (permalink)
Thumbs Must Hurt
Join Date: Jul 2007
Model: 8800
Carrier: TDC
Posts: 115
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default classes missing in RIM API

Please Login to Remove!

hi guyz... im desperately in need of the ObjectInputStream class as i need to convert a byte[] to an object which then will be casted to a hashMap.

I had no problem converting my hashmap to a byte[] with java where i used this method on my serverside application using the Java API

private static byte[] serialize(Object o) throws IOException {
ByteArrayOutputStream ba = new ByteArrayOutputStream();
ObjectOutputStream oba = new ObjectOutputStream(ba);
return ba.toByteArray();

however... when using RIM API they removed the ObjectInputStream classes which makes this method not being able to compile

private static Object deserialize(byte[] b) throws IOException, ClassNotFoundException {
ByteArrayInputStream ba = new ByteArrayInputStream(b);
ObjectInputStream oba = new ObjectInputStream(ba);
return oba.readObject();

any way around this?
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Copyright 2004-2014
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.