Package io.milton.zsync
Class OffsetPair
java.lang.Object
io.milton.zsync.OffsetPair
An object representing a single match between a block on the client file and a block
on the server file. The Pair (localOffset, remoteBlock) means that the block in the local file
at byte
localOffset is identical to block number remoteBlock in
the remote file.- Author:
- Nick
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longThe byte offset of the block in the local filefinal longThe index of the block in the remote file -
Constructor Summary
ConstructorsConstructorDescriptionOffsetPair(long offset, long blockIndex) Constructs an immutable OffsetPair. -
Method Summary
-
Field Details
-
localOffset
public final long localOffsetThe byte offset of the block in the local file -
remoteBlock
public final long remoteBlockThe index of the block in the remote file
-
-
Constructor Details
-
OffsetPair
public OffsetPair(long offset, long blockIndex) Constructs an immutable OffsetPair.- Parameters:
offset- The start byte of the local blockblockIndex- The index of the remote block
-