Class ExternalBlock


  • public class ExternalBlock
    extends Block
    A Block used by Slices to store data externally
    • Constructor Detail

      • ExternalBlock

        public ExternalBlock​(BlockCompressionMethod compressionMethod,
                             int contentId,
                             byte[] compressedContent,
                             int uncompressedLength)
        Create a new external data block with the given compression method, uncompressed content, and content ID. The block will have EXTERNAL content type.
        Parameters:
        compressionMethod - the compression method used in this block
        contentId - the external identifier for the block
        compressedContent - the content of this block, in compressed mode
        uncompressedLength - the length of the content stored in this block when uncompressed
    • Method Detail

      • getContentId

        public final int getContentId()
        Description copied from class: Block
        Return the External Content ID for this block. Only ExternalBlocks have a meaningful Content ID, so that class overrides this method.
        Overrides:
        getContentId in class Block
        Returns:
        the External Content ID, or NO_CONTENT_ID