Java Binary Encode toBinaryBoolean(boolean source)

Here you can find the source of toBinaryBoolean(boolean source)

Description

to Binary Boolean

License

Open Source License

Declaration

public static byte[] toBinaryBoolean(boolean source) 

Method Source Code

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

public class Main {
    public static byte[] toBinaryBoolean(boolean source) {
        return new byte[] { (byte) (source ? 0x01 : 0x00) };
    }/* ww w  .jav a2 s .  co m*/
}

Related

  1. toBinary(long v, int len)
  2. toBinary(short value)
  3. toBinaryAddress(int index, int maxIndex)
  4. toBinaryArray(int input, int length)
  5. toBinaryArray(int integer, int size)
  6. toBinaryChar(boolean bit)
  7. toBinaryClassName(String fileName)
  8. toBinaryFromHex(byte ch)
  9. toBinaryID(final String id)