Java Unsigned Number Create unsignedCharToInt(byte[] b)

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

Description

unsigned Char To Int

License

Open Source License

Declaration

public static final int unsignedCharToInt(byte[] b) 

Method Source Code

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

public class Main {
    public static final int unsignedCharToInt(byte[] b) {
        if (b.length != 1) {
            throw new IllegalArgumentException();
        }//from   ww  w.  j a  va  2s .co  m
        int i = 0;
        i |= b[0] & 0xff;
        return i;
    }
}

Related

  1. unsignedByteToString(int i)
  2. unsignedByteValue(byte[] data, int offset)
  3. unsignedByteValue(final byte input)
  4. unsignedChar(char c)
  5. unsignedChar(int val)
  6. unsignedCompare(long left, long right)
  7. unsignedConstraintValue(double v, double min, double max)
  8. unsignedDiv(long l1, long l2)
  9. unsignedExtend(String hex)