def <<(object)
            unless object.generation == 0
                raise InvalidObjectError, "Cannot store an object with generation > 0 in an ObjectStream"
            end

            if object.is_a?(Stream)
                raise InvalidObjectError, "Cannot store a Stream in an ObjectStream"
            end

            # We must have an associated document to generate new object numbers.
            if @document.nil?
                raise InvalidObjectError, "The ObjectStream must be added to a document before inserting objects"
            end

            # The object already belongs to a document.
            unless object.document.nil?
                object = import_object_from_document(object)
            end

            load!

            object.no, object.generation = @document.allocate_new_object_number if object.no == 0
            store_object(object)

            Reference.new(object.no, 0)
        end
def <<(object)
            unless object.generation == 0
                raise InvalidObjectError, "Cannot store an object with generation > 0 in an ObjectStream"
            end

            if object.is_a?(Stream)
                raise InvalidObjectError, "Cannot store a Stream in an ObjectStream"
            end

            # We must have an associated document to generate new object numbers.
            if @document.nil?
                raise InvalidObjectError, "The ObjectStream must be added to a document before inserting objects"
            end

            # The object already belongs to a document.
            unless object.document.nil?
                object = import_object_from_document(object)
            end

            load!

            object.no, object.generation = @document.allocate_new_object_number if object.no == 0
            store_object(object)

            Reference.new(object.no, 0)
        end
Adds a new Object to this Stream.
 _object_:: The Object to append.