docs: private void writeObject(java.io.ObjectOutputStream s)
                      throws java.io.IOException {
  
          s.defaultWriteObject();
  
          Object[] elements = getArray();
          // Write out array length
          s.writeInt(elements.length);
  
          // Write out all elements in the proper order.
          for (Object element : elements)
              s.writeObject(element);
      }