Package org.exbin.xbup.core.block
Interface XBTBlock
-
- All Known Subinterfaces:
XBTEditableBlock
- All Known Implementing Classes:
XBTDefaultBlock,XBTEmptyBlock
public interface XBTBlockInterface for read access to XBUP level 1 block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XBAttributegetAttributeAt(int attributeIndex)Gets attribute of given index.XBAttribute[]getAttributes()Gets array of attributes in order of appearance.intgetAttributesCount()Gets count of attributes.org.exbin.auxiliary.paged_data.BinaryDatagetBlockData()Gets block data.XBBlockTypegetBlockType()Gets block type.java.io.InputStreamgetData()Gets block data.XBBlockDataModegetDataMode()Returns whether this block is data block.XBTBlockgetChildAt(int childIndex)Gets children of given index.XBTBlock[]getChildren()Gets array of all children.intgetChildrenCount()Gets count of children blocks.java.util.Optional<XBTBlock>getParentBlock()Gets parent block or null 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<XBTBlock> getParentBlock()
Gets parent block or null if block has no parent.- Returns:
- parent block
-
getTerminationMode
@Nonnull XBBlockTerminationMode getTerminationMode()
Returns whether this block is using sequence of children ended with termination block.- Returns:
- terminated mode
-
getDataMode
@Nonnull XBBlockDataMode getDataMode()
Returns whether this block is data block.- Returns:
- data mode
-
getBlockType
@Nonnull XBBlockType getBlockType()
Gets block type.- Returns:
- block type
-
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. Returns zero if attribute index greater than attributes count.- Parameters:
attributeIndex- index of attribute- Returns:
- attribute value
-
getAttributesCount
int getAttributesCount()
Gets count of attributes.- Returns:
- count of attributes
-
getChildren
@Nullable XBTBlock[] getChildren()
Gets array of all children.- Returns:
- array of child blocks
-
getChildAt
@Nullable XBTBlock getChildAt(int childIndex)
Gets children of given index. If no child for given index exist, return null.- Parameters:
childIndex- index of child block- Returns:
- child block
-
getChildrenCount
int getChildrenCount()
Gets count of children blocks.- 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
-
-