java - Convert byte [] to ArrayList<Object> -


i have byte [] obtained using object arraylist

can tell me how convert byte [] object arraylist?

  • coveting arraylist this

                bytearrayoutputstream bos = new bytearrayoutputstream();     objectoutputstream oos = null;     oos = new objectoutputstream(bos);      oos.writeobject(marraylist);//marraylist array convert     byte[] buff = bos.tobytearray(); 

thank you!

now you've given information how did conversion 1 way... need:

objectinputstream ois = new objectinputstream(new bytearrayinputstream(bytes)); try {     @suppresswarnings("unchecked")     arraylist<object> list = (arraylist<object>) ois.readobject();     ... } {     ois.close(); } 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -