code: private void writeObject(java.io.ObjectOutputStream s)
  		throws java.io.IOException{
  		int expectedModCount = modCount;
  		// Write out element count, and any hidden stuff
  		s.defaultWriteObject();
  
  		// Write out array length
  		s.writeInt(elementData.length);
  
  		// Write out all elements in the proper order.
  		for (int i=0; i<size; i++)
  			s.writeLong(elementData[i]);
  
  		 if (modCount != expectedModCount) {
  			throw new ConcurrentModificationException();
  		}
  	}
docs: Save the state of the <tt>ArrayList</tt> instance to a stream (that
  is, serialize it).
  
  @serialData The length of the array backing the <tt>ArrayList</tt>
  instance is emitted (int), followed by all of its elements
  (each an <tt>Object</tt>) in the proper order.