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

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

Description

byte To Boolean

License

Apache License

Declaration

public static boolean byteToBoolean(byte[] b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean byteToBoolean(byte[] b) {
        if ((b[0] & 0xFF) == 0) {
            return false;
        } else {/*from  w w  w .jav  a 2 s .c om*/
            return true;
        }
    }
}

Related

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