Java Integer Array to Long intArrayToLongArray(int[] ints)

Here you can find the source of intArrayToLongArray(int[] ints)

Description

int Array To Long Array

License

LGPL

Declaration

public static long[] intArrayToLongArray(int[] ints) 

Method Source Code

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

public class Main {
    public static long[] intArrayToLongArray(int[] ints) {
        long[] ret = new long[ints.length / 2];
        for (int i = 0; i < ints.length; i += 2) {
            ret[i / 2] = ((long) ints[i]) << 32 | ints[i + 1];
        }//from   www  .j  av  a2s.c  om
        return ret;
    }
}

Related

  1. intArrayToLong(int[] array)