Package org.exbin.xbup.core.block
Interface XBEditableBlock
-
- All Superinterfaces:
XBBlock
- All Known Implementing Classes:
XBDefaultEditableBlock
@ParametersAreNonnullByDefault public interface XBEditableBlock extends XBBlock
Interface for editable XBUP level 0 block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears all data, attributes and child blocks.XBBlockcreateNewChild(int childIndex)This method instantiates new child node.voidremoveAttribute(int attributeIndex)Removes attribute on given position.voidremoveChild(int childIndex)Removes child on given position.voidsetAttributeAt(XBAttribute attribute, int attributeIndex)Sets attribute of given index.voidsetAttributes(XBAttribute[] attributes)Sets array of attributes in order of appearance.voidsetAttributesCount(int count)Sets count of attributes.voidsetData(java.io.InputStream data)Sets block data.voidsetData(org.exbin.auxiliary.paged_data.BinaryData data)Sets block data.voidsetDataMode(XBBlockDataMode dataMode)Sets data block mode.voidsetChildAt(XBBlock block, int childIndex)Sets children of given index.voidsetChildren(XBBlock[] blocks)Sets array of all children.voidsetChildrenCount(int count)Gets count of children blocks.voidsetParent(XBBlock parent)Sets parent block.voidsetTerminationMode(XBBlockTerminationMode terminationMode)Sets terminated mode.-
Methods inherited from interface org.exbin.xbup.core.block.XBBlock
getAttributeAt, getAttributes, getAttributesCount, getBlockData, getData, getDataMode, getChildAt, getChildren, getChildrenCount, getParentBlock, getTerminationMode
-
-
-
-
Method Detail
-
setParent
void setParent(@Nullable XBBlock parent)Sets parent block.- Parameters:
parent- parent block
-
setTerminationMode
void setTerminationMode(XBBlockTerminationMode terminationMode)
Sets terminated mode.- Parameters:
terminationMode- terminated mode flag
-
setDataMode
void setDataMode(XBBlockDataMode dataMode)
Sets data block mode.- Parameters:
dataMode- data block 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 valueattributeIndex- 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
-
setChildren
void setChildren(@Nullable XBBlock[] blocks)Sets array of all children.- Parameters:
blocks- array of children blocks
-
setChildAt
void setChildAt(XBBlock 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 blockchildIndex- index of child block
-
setChildrenCount
void setChildrenCount(int count)
Gets count of children blocks. List of children will be trimmed/extended with empty blocks.- Parameters:
count- count of children
-
createNewChild
XBBlock createNewChild(int childIndex)
This method instantiates new child node.- Parameters:
childIndex- child index- Returns:
- new instance of block
-
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.IOExceptionSets block data.- Parameters:
data- data stream- Throws:
java.io.IOException- exception on 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.
-
-