public void setNext(Serializer serializer) {
        this.next = serializer;
    }
Sets the next serializer in the chain.

@param serializer the next serializer.
src/main/java/spark/serialization/Serializer.java