Android Byte Array to Int Convert buildInt(byte first, byte second)

Here you can find the source of buildInt(byte first, byte second)

Description

build Int

Declaration

public static int buildInt(byte first, byte second) 

Method Source Code

//package com.java2s;

public class Main {
    public static int buildInt(byte first, byte second) {
        return (byte) ((second << 8) & 0xFF) + (first & 0xFF);
    }//from  ww  w. j  av  a 2 s.  co  m
}

Related

  1. swap32bitsToArray(int value, byte[] dest, int offset)
  2. swapU16bitFromArray(byte[] value, int offset)
  3. toInt(byte[] in)
  4. parseInt(byte[] b, int start, int end, int radix)
  5. parseInt(byte[] b, int start, int end)
  6. extractInt(byte[] data, int offset)
  7. ByteToInt(byte[] b)
  8. byteArray2Int(byte[] b)
  9. byteArray2Int1(byte[] b)