See if you can write your ArrayList to an ObjectOutputStream built with a ByteArrayOutputStream. That will "serialize" your object into a byte array. On the other end you'd feed that array back into an ObjectInputStream.
Read the ObjectOutputStream doc carefully. There are some details that can confuse your or prevent this from working with your particular objects.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi