Java Byte to Int ubyte2int(final byte x)

Here you can find the source of ubyte2int(final byte x)

Description

Interprets the value of x as an unsigned byte, and returns it as integer.

License

Open Source License

Declaration

public static int ubyte2int(final byte x) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*ww  w  . j  a v  a 2 s.c  o m*/
     * Interprets the value of x as an unsigned byte, and returns it as integer. For example,
     * ubyte2int(0xFF) == 255, not -1.
     */
    public static int ubyte2int(final byte x) {
        return x & 0xFF;
    }
}

Related

  1. byteToNum(byte bByte)
  2. byteToNumString(byte b)
  3. byteToOffset(int value)
  4. byteToPositiveInt(byte inByte)
  5. ubyte2int(byte in)