Package htsjdk.tribble.index
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 Summary
Constructors Constructor Description Block(long startPosition, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getEndPosition()
long
getSize()
long
getStartPosition()
int
hashCode()
void
setEndPosition(long endPosition)
This method is used to aid in consolidating blocks.
-
-
-
Method Detail
-
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 providedendPosition
- 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.
-
-