Here you can find the source of toLongArray(byte[] b)
public static long[] toLongArray(byte[] b)
//package com.java2s; /**/* w w w . j a va 2 s .c om*/ * @(#)ByteUtils.java, 2013-2-24. * * Copyright 2013 Netease, Inc. All rights reserved. * NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.nio.ByteBuffer; public class Main { public static long[] toLongArray(byte[] b) { ByteBuffer bb = ByteBuffer.wrap(b); int length = bb.getInt(); if (length == -1) { return null; } long[] la = new long[length]; for (int i = 0; i < length; i++) { la[i] = bb.getLong(); } return la; } }