Package org.exbin.xbup.core.block
Interface XBTEditableDocument
-
- All Superinterfaces:
XBTDocument
@ParametersAreNonnullByDefault public interface XBTEditableDocument extends XBTDocument
Basic interface for editable XBUP level 1 document.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears all data in this document.XBTBlock
createNewBlock(XBTBlock parent)
Creates new instance of block as next child for given block.java.util.Optional<XBTBlock>
findBlockByIndex(long index)
Finds node using depth-first traversal index.void
setRootBlock(XBTBlock block)
Sets root block of the document.void
setTailData(java.io.InputStream source)
Sets tail data.-
Methods inherited from interface org.exbin.xbup.core.block.XBTDocument
getDocumentSize, getRootBlock, getTailData, getTailDataSize
-
-
-
-
Method Detail
-
setRootBlock
void setRootBlock(@Nullable XBTBlock block)
Sets root block of the document.- Parameters:
block
- the block to use as root block for this document
-
setTailData
void setTailData(@Nullable java.io.InputStream source) throws java.io.IOException
Sets tail data.- Parameters:
source
- data stream- Throws:
java.io.IOException
- if input/output error
-
clear
void clear()
Clears all data in this document.
-
findBlockByIndex
@Nonnull java.util.Optional<XBTBlock> findBlockByIndex(long index)
Finds node using depth-first traversal index.- Parameters:
index
- order of the block in document- Returns:
- block if found else null
-
-