Java Byte Array to Unsigned Int bytesToUshort(byte first, byte second)

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

Description

bytes To Ushort

License

Apache License

Declaration

public static short bytesToUshort(byte first, byte second) 

Method Source Code

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

public class Main {
    public static short bytesToUshort(byte first, byte second) {
        short value = (short) (((first & 0xFF) << 8) | (second & 0xFF));
        return value;
    }//from  w w  w.  ja  va2  s . com
}

Related

  1. bytesToUIntLE(byte[] data)
  2. bytesToUIntLong(byte[] bytes, int index)
  3. bytesToUnsignedInt(byte ib1, byte ib2)
  4. bytesToUnsignedInts(byte[] bytes)
  5. bytesToUshort(byte b1, byte b2)