code: @Override
      public void writeArray(Collection<?> array) {
          writeAMF3();
          buf.put(AMF3.TYPE_ARRAY);
          if (hasReference(array)) {
              putInteger(getReferenceId(array) << 1);
              return;
          }
          storeReference(array);
          amf3_mode += 1;
          int count = array.size();
          putInteger(count << 1 | 1);
          putString("");
          for (Object item : array) {
              Serializer.serialize(this, item);
          }
          amf3_mode -= 1;
      }
docs: {@inheritDoc}