Class FrameFileFooter


  • public class FrameFileFooter
    extends Object
    Encapsulation for ƒrame file footer related operations. The footer must be wrapped in a memory object (the memory can be physical or mmaped). Some verifications are also done on the footer to see if it is not corrupted. The schema for footer is as described by FrameFile.
    • Constructor Detail

      • FrameFileFooter

        public FrameFileFooter​(org.apache.datasketches.memory.Memory footerMemory,
                               long frameFileLength)
                        throws IOE
        Throws:
        IOE
    • Method Detail

      • getPartitionStartFrame

        public int getPartitionStartFrame​(int partition)
        First frame of a given partition. Partitions beyond getNumPartitions() are treated as empty: if provided, this method returns getNumFrames().
      • getFrameEndPosition

        public long getFrameEndPosition​(int frameNumber)
        Get the last byte for the frame specified. The byte number is offsetted from the frame file start and is exclusive.
        Parameters:
        frameNumber - the id of the frame to get the end position for
        Returns:
        a long exclusive index representing the frame end
      • getNumFrames

        public int getNumFrames()
      • getNumPartitions

        public int getNumPartitions()