Java Long Number Align align(long size, long boundary)

Here you can find the source of align(long size, long boundary)

Description

align

License

Open Source License

Declaration

public static long align(long size, long boundary) 

Method Source Code

//package com.java2s;
/*/*  w ww.  j  a va2  s . c o  m*/
 * ====================================================================
 * Copyright (c) 2004-2012 TMate Software Ltd.  All rights reserved.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at http://svnkit.com/license.html.
 * If newer versions of this license are posted there, you may use a
 * newer version instead, at your option.
 * ====================================================================
 */

public class Main {
    public static long align(long size, long boundary) {
        return (size + boundary - 1) & ~(boundary - 1);
    }
}

Related

  1. align(final long value, final long alignment)
  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)