Package htsjdk.tribble.index
Class Block
java.lang.Object
htsjdk.tribble.index.Block
Represents a contiguous block of bytes in a file, defined by a start position and size (in bytes)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
long
long
getSize()
long
int
hashCode()
void
setEndPosition
(long endPosition) This method is used to aid in consolidating blocks.
-
Constructor Details
-
Block
public Block(long startPosition, long size) - Parameters:
startPosition
- in bytessize
- 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 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.
-
equals
-
hashCode
public int hashCode()
-