java - How can I get the byte value in a Map -


this question has answer here:

i value of byte inside map object.

map<string, object> data = new hashmap<>(); data.put("foo", new byte[]{4});  system.out.println(data.get("foo")); 

what i'm getting this... [b@1a779dce

please me.

as adding object map not byte[] need cast it.

map<string, object> data = new hashmap<>(); data.put("foo", new byte[]{4,3,1,2}); system.out.println(arrays.tostring((byte[])data.get("foo"))); 

output

[4,3,1,2] 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -