BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-18-2007, 07:18 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: TDC
Posts: 115
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default java.io 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);
oba.writeObject(o);
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?
Offline  
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

Gould 115V D.C. Amplifier 30 Watt 50/400 Hz FREQ 11.4123.01
$213.75
Gould 115V D.C. Amplifier  30 Watt 50/400 Hz FREQ 11.4123.01 pictureCompumotor AT6250 2_axis controller
$350.0
Compumotor AT6250 2_axis controller pictureDANAHER MOTION SERVOSTAR 303 S30361-NA-SB
$349.99
DANAHER  MOTION SERVOSTAR 303 S30361-NA-SB picture10Pcs Tl072cdt Smd Tl072cd Tl072c Tl072 072C Amplifier New Ic Q
$0.99
10Pcs Tl072cdt Smd Tl072cd Tl072c Tl072 072C Amplifier New Ic Q pictureOmron Power Supply S82F-1524 S82F1524
$35.0
Omron Power Supply S82F-1524 S82F1524  picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.