@ SuppressWarnings ( "unchecked" ) private BufferOutput writeByClass ( Class < ? > type , Object object , BufferOutput output , TypeSerializer serializer ) { if ( whitelistRequired . get ( ) ) throw new SerializationException ( "cannot serialize unregistered type: " + type ) ; serializer . write ( object , output . writeByte ( Identifier . CLASS . code ( ) ) . writeUTF8 ( type . getName ( ) ) , this ) ; return output ; }
Writes an object to the buffer with its class name .