Java Unsigned Int Create toUnsignedIntArray(byte[] val)

Here you can find the source of toUnsignedIntArray(byte[] val)

Description

to Unsigned Int Array

License

BSD License

Declaration

public static int[] toUnsignedIntArray(byte[] val) 

Method Source Code

//package com.java2s;
/**//  w w  w  . j  ava 2  s .c o  m
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * @author Jay Codec
 * 
 */

public class Main {
    public static int[] toUnsignedIntArray(byte[] val) {
        int[] result = new int[val.length];
        for (int i = 0; i < val.length; i++)
            result[i] = val[i] & 0xff;
        return result;
    }
}

Related

  1. toUnsignedInt(int value)
  2. toUnsignedInt(long value)
  3. toUnsignedInt(String string)
  4. toUnsignedInt16(byte[] bytes)
  5. toUnsignedInt32LittleEndian(byte[] bytes)
  6. toUnsignedIntBigEndien(byte[] bytes)