在java中怎么把字节数组转换成二进制字符串

public class Test {
	public static void main(String args[])   {
		String ZERO="00000000";
		String x ="lalala";
		byte[]   bs   =   x.getBytes();
		for   (int i = 0;i
			8)   {
				s   =   s.substring(s.length()   -   8);
			}   else   if   (s.length()  
					<   8)   {
				s   =   ZERO.substring(s.length())   +   s;
			}
			System.out.println(s);
		}
	}
} 

你可能感兴趣的:(java白痴)