i had a difficulty in converting an arraylist into a byte array and again retrive it into an arraylist again.
The Collections API has methods to convert between ArrayList and an array of Object references. However, a byte[] is NOT and array of object references, it is a single object that can hold an array of byte primitive values.
You will have to write code to iterate through the ArrayList or byte[], converting values one at a time between object and primitive.
Bill