Package org.exbin.xbup.core.block
Interface XBBlock
-
- All Known Subinterfaces:
XBEditableBlock
- All Known Implementing Classes:
XBDefaultBlock
,XBDefaultEditableBlock
,XBEmptyBlock
public interface XBBlock
Interface for read access to XBUP level 0 block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XBAttribute
getAttributeAt(int attributeIndex)
Gets attribute of given index / order.XBAttribute[]
getAttributes()
Gets array of attributes in order of appearance.int
getAttributesCount()
Gets count of attributes.org.exbin.auxiliary.paged_data.BinaryData
getBlockData()
Gets block data.java.io.InputStream
getData()
Gets block data.XBBlockDataMode
getDataMode()
Returns mode whether this block is data block.XBBlock
getChildAt(int childIndex)
Gets child block of given index.XBBlock[]
getChildren()
Gets array of all children blocks.int
getChildrenCount()
Gets count of children.java.util.Optional<XBBlock>
getParentBlock()
Gets parent block or empty if block has no parent.XBBlockTerminationMode
getTerminationMode()
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
-
-