Here you can find the source of bytes2LengthToIntLowOrder(byte[] intBytes)
public static int bytes2LengthToIntLowOrder(byte[] intBytes)
//package com.java2s; /*/*from www.j a v a 2 s . c om*/ * @(#)ByteConvertUtil.java V0.0.1 2015-2-3, ????1:37:07 * * Copyright 2015 www.ifood517.com. All rights reserved. * www.ifood517.com PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ public class Main { public static int bytes2LengthToIntLowOrder(byte[] intBytes) { byte[] data = new byte[2]; System.arraycopy(intBytes, 0, data, 0, 2); return (int) ((0 & 0xff) << 24) | ((0 & 0xff) << 16) | ((data[1] & 0xff) << 8) | ((data[0] & 0xff) << 0); } public static int bytes2LengthToIntLowOrder(byte[] intBytes, int index) { byte[] data = new byte[2]; System.arraycopy(intBytes, index, data, 0, 2); return (int) ((0 & 0xff) << 24) | ((0 & 0xff) << 16) | ((data[1] & 0xff) << 8) | ((data[0] & 0xff) << 0); } }