code: @Override
      public void writeArray(Object array) {
          if (array != null) {
              if (!checkWriteReference(array)) {
                  storeReference(array);
                  buf.put(AMF.TYPE_ARRAY);
                  buf.putInt(Array.getLength(array));
                  for (int i = 0; i < Array.getLength(array); i++) {
                      Serializer.serialize(this, Array.get(array, i));
                  }
              }
          } else {
              writeNull();
          }
      }
docs: {@inheritDoc}