@Override
    public void serialize(
        @Nonnull
        final Object object, final OutputStream outputStream) throws IOException {
        val result = serializeToByteArray(object);
        outputStream.write(result);
        outputStream.flush();
    }
This is {@link MessageQueueMessageSerializationHandler}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/pubsub/MessageQueueMessageSerializationHandler.java