code: @Override
      public void writeMap(Collection<?> array) {
          if (!checkWriteReference(array)) {
              storeReference(array);
              buf.put(AMF.TYPE_MIXED_ARRAY);
              buf.putInt(array.size() + 1);
              int idx = 0;
              for (Object item : array) {
                  if (item != null) {
                      putString(String.valueOf(idx++));
                      Serializer.serialize(this, item);
                  } else {
                      idx++;
                  }
              }
              putString("length");
              Serializer.serialize(this, array.size() + 1);
              buf.put(AMF.END_OF_OBJECT_SEQUENCE);
          }
      }
docs: {@inheritDoc}