Java Unsigned Number Create unsignedShortToInt(byte[] b)

Here you can find the source of unsignedShortToInt(byte[] b)

Description

unsigned Short To Int

License

Open Source License

Declaration

public static final int unsignedShortToInt(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {
    public static final int unsignedShortToInt(byte[] b) {
        int i = 0;
        i |= b[0] & 0xFF;/*from w ww.j  av a 2 s  .  c o m*/
        i <<= 8;
        i |= b[1] & 0xFF;
        return i;
    }
}

Related

  1. unsignedShort(byte b)
  2. unsignedShort(short s)
  3. unsignedShort2Arr(int var, byte[] arrayBytes, int startIndex)
  4. unsignedShortAt(byte[] data, int pos)
  5. unsignedShortBytesToInt(byte[] b)
  6. unsignedShortToInt(final byte[] b)
  7. unsignedShortToInt(short n)
  8. unsignedSubOverflow(int operand1, int operand2)
  9. unsignedToBytes(byte b)