Java Byte Array to Boolean byteToBoolean(byte[] values)

Here you can find the source of byteToBoolean(byte[] values)

Description

byte To Boolean

License

Open Source License

Declaration

public static boolean[] byteToBoolean(byte[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean[] byteToBoolean(byte[] values) {
        if (values == null) {
            return null;
        }// www  .  j a  v a  2 s . com

        boolean[] results = new boolean[values.length];
        for (int i = 0; i < values.length; i++) {
            results[i] = (values[i] != 0);
        }
        return results;
    }
}

Related

  1. bytesToBoolean(byte[] buffer)
  2. bytesToBooleanArray(byte[] input)
  3. bytesToBooleans(byte[] bytes)
  4. byteToBoolean(byte[] b)
  5. byteToBoolean(byte[] byt)