Here you can find the source of printByte(byte b)
Parameter | Description |
---|---|
b | byte |
public static void printByte(byte b)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w.j a v a 2s . c o m * Prints a byte. * * @param b byte */ public static void printByte(byte b) { String s1 = String.format("%8s", Integer.toBinaryString(b & 0xFF)).replace(' ', '0'); System.out.println(s1); // 10000001 } }