Java Long Number Align alignOffset(int sectorSize, long fileOffset)

Here you can find the source of alignOffset(int sectorSize, long fileOffset)

Description

align Offset

License

Apache License

Declaration

public static long alignOffset(int sectorSize, long fileOffset) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static long alignOffset(int sectorSize, long fileOffset) {
        return fileOffset - namespaceSectorOffset(sectorSize, fileOffset);
    }//from  w  ww.  j ava2  s.  c o  m

    public static long namespaceSectorOffset(int sectorSize, long fileOffset) {
        return fileOffset % (long) sectorSize;
    }
}

Related

  1. align(long size, long boundary)
  2. align(long value, int al)
  3. align(long value, long alignment)
  4. alignDown(long value, long granularity)
  5. alignLength(int sectorSize, long remoteOffset, long len)
  6. alignQueryTimestampToBaseAggregationTime(long queryTimestamp)
  7. alignSize(long size)
  8. alignSize(long size, long alignment)
  9. alignUp(long b, long a)