Java Byte to Bit byteToBits(byte b)

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

Description

byte To Bits

License

Open Source License

Declaration

private static String byteToBits(byte b) 

Method Source Code

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

public class Main {
    private static String byteToBits(byte b) {
        StringBuffer buf = new StringBuffer();
        for (int i = 0; i < 8; i++)
            buf.append((int) (b >> (8 - (i + 1)) & 0x0001));
        return buf.toString();
    }//from   w w  w .  jav  a  2  s.c  o  m
}

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)