Interface XBTEditableBlock

  • All Superinterfaces:
    XBTBlock

    @ParametersAreNonnullByDefault
    public interface XBTEditableBlock
    extends XBTBlock
    Interface for editable XBUP level 1 block.
    • Method Detail

      • setParent

        void setParent​(@Nullable
                       XBTBlock parent)
        Sets parent block.
        Parameters:
        parent - block
      • setTerminationMode

        void setTerminationMode​(XBBlockTerminationMode terminationMode)
        Sets terminated mode.
        Parameters:
        terminationMode - terminated mode flag
      • setDataMode

        void setDataMode​(XBBlockDataMode dataMode)
        Sets data mode.
        Parameters:
        dataMode - data mode
      • setAttributes

        void setAttributes​(@Nullable
                           XBAttribute[] attributes)
        Sets array of attributes in order of appearance.
        Parameters:
        attributes - array of attributes
      • setAttributeAt

        void setAttributeAt​(XBAttribute attribute,
                            int attributeIndex)
        Sets attribute of given index. If index is greater than current count of attributes, new zero attributes will be filled.
        Parameters:
        attribute - attribute value
        attributeIndex - attribute index
      • setAttributesCount

        void setAttributesCount​(int count)
        Sets count of attributes. List of attributes will be trimmed/extended with zero values.
        Parameters:
        count - count of attributes
      • removeAttribute

        void removeAttribute​(int attributeIndex)
        Removes attribute on given position.
        Parameters:
        attributeIndex - attribute index
      • setBlockType

        void setBlockType​(XBBlockType blockType)
        Sets block type.
        Parameters:
        blockType - block type
      • setChildren

        void setChildren​(@Nullable
                         XBTBlock[] blocks)
        Sets array of all children.
        Parameters:
        blocks - array of blocks
      • createNewChild

        @Nonnull
        XBTBlock createNewChild​(int childIndex)
        This method instantiates new child node.
        Parameters:
        childIndex - child index
        Returns:
        new instance of block
      • setChildAt

        void setChildAt​(XBTBlock block,
                        int childIndex)
        Sets children of given index. If index is greater than current count of children, new empty blocks will be filled.
        Parameters:
        block - child block
        childIndex - child index
      • setChildrenCount

        void setChildrenCount​(int count)
        Gets count of children. List of children will be trimmed/extended with empty blocks.
        Parameters:
        count - count of child blocks
      • removeChild

        void removeChild​(int childIndex)
        Removes child on given position.
        Parameters:
        childIndex - child index
      • setData

        void setData​(@Nullable
                     java.io.InputStream data)
              throws java.io.IOException
        Sets block data.
        Parameters:
        data - data stream
        Throws:
        java.io.IOException - if input/output error
      • setData

        void setData​(@Nullable
                     org.exbin.auxiliary.paged_data.BinaryData data)
        Sets block data.
        Parameters:
        data - data stream
      • clear

        void clear()
        Clears all data, attributes and child blocks.