Java Byte to Bit byteToBits(byte b)

Here you can find the source of byteToBits(byte b)

Description

byte To Bits

License

Apache License

Declaration

public static String byteToBits(byte b) 

Method Source Code

//package com.java2s;
//PduUtils is distributed under the terms of the Apache License version 2.0

public class Main {
    public static String byteToBits(byte b) {
        String bits = Integer.toBinaryString(b & 0xFF);
        while (bits.length() < 8) {
            bits = "0" + bits;
        }// w  ww.j  a v  a2 s  . co m
        return bits;
    }
}

Related

  1. byteToBit(byte b)
  2. byteToBitArray(byte b)
  3. byteToBits(byte b)
  4. byteToBits(byte b)
  5. byteToBits(byte b)
  6. byteToBits(byte b)
  7. byteToBitsArray(byte b)
  8. byteToBitStr(byte b)