Here you can find the source of long2longArr(long val, long[] res)
public static long[] long2longArr(long val, long[] res)
//package com.java2s; /*/*ww w. ja v a2 s . co m*/ sopc2dts - Devicetree generation for Altera systems Copyright (C) 2012 - 2014 Walter Goossens <waltergoossens@home.nl> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ public class Main { public static long[] long2longArr(long val, long[] res) { if (res.length == 1) { res[0] = val & 0xFFFFFFFFL; } else if (res.length > 1) { res[res.length - 2] = (val >> 32) & 0xFFFFFFFFL; res[res.length - 1] = val & 0xFFFFFFFFL; for (int i = 0; i < res.length - 2; i++) { res[i] = 0; } } return res; } }