Class Block

java.lang.Object
htsjdk.tribble.index.Block

public class Block extends Object
Represents a contiguous block of bytes in a file, defined by a start position and size (in bytes)
  • Constructor Details

    • Block

      public Block(long startPosition, long size)
      Parameters:
      startPosition - in bytes
      size - in bytes
  • Method Details

    • getStartPosition

      public long getStartPosition()
      Returns:
      the startPosition
    • getEndPosition

      public long getEndPosition()
    • setEndPosition

      public void setEndPosition(long endPosition)
      This method is used to aid in consolidating blocks. Sets the size based on the provided endPosition
      Parameters:
      endPosition - Where the block ends, in bytes
    • getSize

      public long getSize()
      Returns:
      the # of bytes in this block. Note that for block-compressed files, this is not truly the size of the block in the file. getEndPosition should be used to determine the virtual file offset of the end of the region of interest.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object