Package org.exbin.xbup.core.block
Interface XBBlock
-
- All Known Subinterfaces:
XBEditableBlock
- All Known Implementing Classes:
XBDefaultBlock,XBDefaultEditableBlock,XBEmptyBlock
public interface XBBlockInterface for read access to XBUP level 0 block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XBAttributegetAttributeAt(int attributeIndex)Gets attribute of given index / order.XBAttribute[]getAttributes()Gets array of attributes in order of appearance.intgetAttributesCount()Gets count of attributes.org.exbin.auxiliary.paged_data.BinaryDatagetBlockData()Gets block data.java.io.InputStreamgetData()Gets block data.XBBlockDataModegetDataMode()Returns mode whether this block is data block.XBBlockgetChildAt(int childIndex)Gets child block of given index.XBBlock[]getChildren()Gets array of all children blocks.intgetChildrenCount()Gets count of children.java.util.Optional<XBBlock>getParentBlock()Gets parent block or empty if block has no parent.XBBlockTerminationModegetTerminationMode()Returns whether this block is using sequence of children ended with termination block.
-
-
-
Method Detail
-
getParentBlock
@Nonnull java.util.Optional<XBBlock> getParentBlock()
Gets parent block or empty if block has no parent.- Returns:
- Parent block.
-
getDataMode
@Nonnull XBBlockDataMode getDataMode()
Returns mode whether this block is data block.- Returns:
- data mode
-
getTerminationMode
@Nonnull XBBlockTerminationMode getTerminationMode()
Returns whether this block is using sequence of children ended with termination block.- Returns:
- termination mode
-
getAttributes
@Nullable XBAttribute[] getAttributes()
Gets array of attributes in order of appearance.- Returns:
- array of attributes
-
getAttributeAt
@Nullable XBAttribute getAttributeAt(int attributeIndex)
Gets attribute of given index / order.- Parameters:
attributeIndex- index/order of attribute- Returns:
- attribute value
-
getAttributesCount
int getAttributesCount()
Gets count of attributes.- Returns:
- count of attributes
-
getChildren
@Nullable XBBlock[] getChildren()
Gets array of all children blocks.- Returns:
- list of child blocks
-
getChildAt
@Nullable XBBlock getChildAt(int childIndex)
Gets child block of given index.- Parameters:
childIndex- index of child block- Returns:
- child block
-
getChildrenCount
int getChildrenCount()
Gets count of children.- Returns:
- count of children
-
getData
@Nonnull java.io.InputStream getData()
Gets block data.- Returns:
- block data or throws invalid operation on non-data block
-
getBlockData
@Nonnull org.exbin.auxiliary.paged_data.BinaryData getBlockData()
Gets block data.- Returns:
- block data or throws invalid operation on non-data block
-
-