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

4x OC30 TESLA GERMANIUM Ge Transistors 32V / 1.4A / 4W / Hfe 17-100
$9.87
4x OC30 TESLA GERMANIUM Ge Transistors 32V / 1.4A / 4W / Hfe 17-100 picture2N5641 MOTOROLA Silicon Power Transistor Gold Pin / Si NPN 35V 1A 15W X-27
$11.87
2N5641 MOTOROLA Silicon Power Transistor Gold Pin / Si NPN 35V 1A 15W X-27 pictureNew 10pcs 2N6027 and ORIGIBBH Programmable Unijunction Transistors BH
$4.47
New 10pcs 2N6027 and ORIGIBBH Programmable Unijunction Transistors BH picture7A 150-PCS LOT Diode Schottky 20V 3A Through Hole DO-201AD 1N5820 A
$0.99
7A  150-PCS LOT Diode Schottky 20V 3A Through Hole DO-201AD    1N5820  A picture5PCS(pieces)New 2SA1831 A1831 Transistor TO220 Original Sanyo
$4.73
5PCS(pieces)New 2SA1831 A1831 Transistor TO220 Original Sanyo picture






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