convertion

Hi ,

How to convert from object to byte[].

Thanks,

[69 byte] By [ballanianga] at [2007-11-27 10:52:36]
# 1

> Hi ,

>

> How to convert from object to byte[].

> Thanks,

What, did you cast a byte[] to an object and now want to cast back or something? Why would you do this?

Navy_Codera at 2007-7-29 11:38:51 > top of Java-index,Java Essentials,Java Programming...
# 2

Double-post.

Answered here:

http://forum.java.sun.com/thread.jspa?threadID=5195951&tstart=0

Navy_Codera at 2007-7-29 11:38:51 > top of Java-index,Java Essentials,Java Programming...
# 3

I'm developping a DNS server. When I got a response I should keep it on cache for next same request.

Now I 'm using a hashtable <www.toto.com, thebytearray[]> but hashtable converts the byte[] into Object. So I want my byte[] back ...

Thanks for any help.

ballanianga at 2007-7-29 11:38:51 > top of Java-index,Java Essentials,Java Programming...
# 4

sample code object to byte and byte to object:

http://java.ittoolbox.com/groups/technical-functional/java-l/object-to-byte-and-byte-to-object-189130

Yannixa at 2007-7-29 11:38:51 > top of Java-index,Java Essentials,Java Programming...
# 5

> I'm developping a DNS server. When I got a response I

> should keep it on cache for next same request.

> Now I 'm using a hashtable <www.toto.com,

> thebytearray[]> but hashtable converts the byte[]

> into Object. So I want my byte[] back ...

> Thanks for any help.

Refer to your original post. I just gave you an example.

Navy_Codera at 2007-7-29 11:38:51 > top of Java-index,Java Essentials,Java Programming...