Java Unsigned Number Create unsignedByteToInt(byte b)

Here you can find the source of unsignedByteToInt(byte b)

Description

Converts an unsigned byte to an integer.

License

Open Source License

Parameter

Parameter Description
b the byte to be converted.

Return

an integer containing the unsigned byte value.

Declaration

public static final int unsignedByteToInt(byte b) 

Method Source Code

//package com.java2s;
//License/*from  w w  w.j a  va 2 s . c  o  m*/

public class Main {
    /**
     * Converts an unsigned byte to an integer.
     *
     * @param b the byte to be converted.
     * @return an integer containing the unsigned byte value.
     */
    public static final int unsignedByteToInt(byte b) {
        return (int) b & 0xFF;
    }
}

Related

  1. unsignedArrayCompareLex(char[] a, char[] b)
  2. unsignedBinarySearch(final short[] array, final int begin, final int end, final short k)
  3. unsignedByte(int b)
  4. unsignedByteFromInt(int i)
  5. unsignedBytesToInts(Byte[] bytes)
  6. unsignedByteToInt(byte b)
  7. unsignedByteToInt(byte in)
  8. unsignedByteToInt(final byte b)
  9. unsignedByteToIntArray(byte[] bytes)