code: public void encodeAmf3(Object obj, Amf3Type marker) throws IOException {
  
          out.write(marker.ordinal());
          if (marker == Amf3Type.NULL) {
              return; // Null marker is enough
          }
  
          serializeAmf3(obj, marker);
      }
docs: Encodes an object in amf3 as an object of
  the specified type
  @param obj The object to encode
  @param marker The type marker for this object
  @throws IOException