Skip to content

Commit

Permalink
Make BlockCompressedFilePointerUtil.makeFilePointer public (#1116)
Browse files Browse the repository at this point in the history
* make a previously package protected method public and add a new overload
* partially addresses #1112
  • Loading branch information
tomwhite authored and lbergelson committed May 15, 2018
1 parent 1bbd3cf commit adf428f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,20 @@ public static boolean areInSameOrAdjacentBlocks(final long vfp1, final long vfp2
return (block1 == block2 || block1 + 1 == block2);
}

/**
* @param blockAddress File offset of start of BGZF block.
* @return Virtual file pointer that points to the start of a BGZF block.
*/
public static long makeFilePointer(final long blockAddress) {
return makeFilePointer(blockAddress, 0);
}

/**
* @param blockAddress File offset of start of BGZF block.
* @param blockOffset Offset into uncompressed block.
* @return Virtual file pointer that embodies the input parameters.
*/
static long makeFilePointer(final long blockAddress, final int blockOffset) {
public static long makeFilePointer(final long blockAddress, final int blockOffset) {
if (blockOffset < 0) {
throw new IllegalArgumentException("Negative blockOffset " + blockOffset + " not allowed.");
}
Expand Down

0 comments on commit adf428f

Please sign in to comment.