Java Byte to Boolean Array byteToBooleanArray(byte byteVal)

Here you can find the source of byteToBooleanArray(byte byteVal)

Description

byte To Boolean Array

License

Open Source License

Declaration

public static boolean[] byteToBooleanArray(byte byteVal) 

Method Source Code

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

public class Main {
    public static boolean[] byteToBooleanArray(byte byteVal) {
        boolean[] result = new boolean[6];
        for (int i = 5; i > 0; i--) {
            result[i] = (byteVal & 0x01) != 0;
            byteVal >>= 1;/*from w w w .  j a va 2s  .  co  m*/
        }
        return result;
    }
}

Related

  1. byteToBooleanArray(byte b)
  2. byteToBooleanArray(byte input)