public class BlockCompressedFilePointerUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_BLOCK_ADDRESS |
static int |
MAX_OFFSET |
| Constructor and Description |
|---|
BlockCompressedFilePointerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areInSameOrAdjacentBlocks(long vfp1,
long vfp2) |
static java.lang.String |
asAddressOffsetString(long vfp)
Return a String with the file pointer in "address:offset" form.
|
static java.lang.String |
asString(long vfp) |
static int |
compare(long vfp1,
long vfp2) |
static long |
getBlockAddress(long virtualFilePointer) |
static int |
getBlockOffset(long virtualFilePointer) |
static long |
makeFilePointer(long blockAddress) |
static long |
makeFilePointer(long blockAddress,
int blockOffset) |
static long |
shift(long virtualFilePointer,
long offset)
Move a virtual file pointer by a given (non-virtual) offset.
|
public static final long MAX_BLOCK_ADDRESS
public static final int MAX_OFFSET
public static int compare(long vfp1,
long vfp2)
vfp1 - vfp2 - public static boolean areInSameOrAdjacentBlocks(long vfp1,
long vfp2)
public static long makeFilePointer(long blockAddress)
blockAddress - File offset of start of BGZF block.public static long makeFilePointer(long blockAddress,
int blockOffset)
blockAddress - File offset of start of BGZF block.blockOffset - Offset into uncompressed block.public static long getBlockAddress(long virtualFilePointer)
virtualFilePointer - public static int getBlockOffset(long virtualFilePointer)
virtualFilePointer - public static long shift(long virtualFilePointer,
long offset)
virtualFilePointer - the original virtual file pointeroffset - the offset in bytespublic static java.lang.String asString(long vfp)
public static java.lang.String asAddressOffsetString(long vfp)
vfp - virtual file pointer to formatvfp formatted as string in address:offset form