Android Byte Array to Int Convert toUInt16(byte[] bytes, int start)

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

Description

to U Int

Declaration

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

Method Source Code

//package com.java2s;

public class Main {
    public static int toUInt16(byte[] bytes, int start) {
        return (bytes[start] & 0xff) + ((bytes[start + 1] & 0xff) << 8);
    }/*from  w  w  w  .  j a  v a  2 s  .c om*/
}

Related

  1. toInteger(byte[] input)
  2. toInteger(byte[] input, int offset)
  3. readInt(byte[] buff, int pos)
  4. getShort(byte[] data)
  5. getUnsignedSafe(byte[] buffer, int pos)
  6. intToOctet(byte[] buf, int i)
  7. readInt(byte[] byteArray, int offset)
  8. writeInt(byte[] byteArray, int offset, int i)