No subject
Sat Nov 12 19:29:10 PST 2005
object for which the toString() method produces "{name=User_ID,
datatype=String}". Unless you happen to recognise this syntax, there's no
imformation here about what class of object you're dealing with, You could
find out what class each object is by calling getClass().getName() on it eg.
vector.firstElement().getClass().getName(). This would give a class name
which you could print and so on. Or you could test whether the object was an
instance of the class you are expecting, and up cast the your reference to
the appropriate type. But I would have thought if you are using the stream
you should already know what the stream should contain by understanding
where it came from, rather than looking at what you happen to get and trying
to make sense of it. If you want to understand how to extract the contents
of a Vector and insert them into a Hashtable I suggest you consult the API
docs for these classes.
Peter Humphries
----- Original Message -----
From: "Christian Ribeaud" <christian.ribeaud at predict.ch>
To: <advanced-java at xcf.berkeley.edu>
Sent: 14 December 2000 15:05
Subject: How to deserialize {name=User_ID, datatype=String}?
Hi,
I am working with wddx and after deserialization I get a Vector.
Every vector's element looks so {name=User_ID, datatype=String} (output with
vector.firstElement().toString()). How to deserialize this? What is this? Is
this a Hashtable? If so, how to create an hashtable with such an input?
Thanks for the help. Have a nice day,
christian
---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu
More information about the Advanced-java
mailing list