Java Unsigned Byte Create toUnsignedByteArray(byte[] b)

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

Description

to Unsigned Byte Array

License

Open Source License

Declaration

public static int[] toUnsignedByteArray(byte[] b) 

Method Source Code

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

public class Main {
    public static int[] toUnsignedByteArray(byte[] b) {
        int[] r = new int[b.length];
        for (int i = 0; i < b.length; i++) {
            r[i] = b[i] + 0x80;//from   ww  w . j a  v a  2s. c  om
        }
        return r;
    }
}

Related

  1. toUnsignedByte(byte value)
  2. toUnsignedByte(byte[] buf, int pos)
  3. toUnsignedByte(char[] bytes, boolean le)
  4. toUnsignedByte(int value)
  5. toUnsignedByte(int value)
  6. toUnsignedBytes(long convert)