Java Byte Array Big Endian bytesHighFirstToInt(byte[] bytes, int start)

Here you can find the source of bytesHighFirstToInt(byte[] bytes, int start)

Description

bytes High First To Int

License

Apache License

Declaration

public static int bytesHighFirstToInt(byte[] bytes, int start) 

Method Source Code

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

public class Main {
    public static int bytesHighFirstToInt(byte[] bytes, int start) {
        int num = bytes[start + 3] & 0xFF;
        num |= ((bytes[start + 2] << 8) & 0xFF00);
        num |= ((bytes[start + 1] << 16) & 0xFF0000);
        num |= ((bytes[start] << 24) & 0xFF000000);
        return num;
    }/*from  w  w w. java2 s  .co m*/
}

Related

  1. bytesBE2long(byte[] b, int off)
  2. BytesBEToFloat(final byte[] value)
  3. BytesBEToInt(final byte[] buf)
  4. bytesHighFirstToChar(byte[] bytes, int start)
  5. bytesHighFirstToFloat(byte[] bytes, int start)