Java Byte Array to Binary bytes2Binary(byte[] bytes)

Here you can find the source of bytes2Binary(byte[] bytes)

Description

bytes Binary

License

Open Source License

Declaration

public static String bytes2Binary(byte[] bytes) 

Method Source Code

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

public class Main {
    public static String bytes2Binary(byte[] bytes) {
        StringBuffer sb = new StringBuffer();
        for (byte b : bytes) {
            sb.append(Integer.toBinaryString(b));
        }//from   w w  w .j  av a 2s .  com
        return sb.toString();
    }
}

Related

  1. bytes2Binary(byte[] b)
  2. bytesToBinary(byte[] b, int byteLength)
  3. bytesToBinString(byte[] bytes)
  4. bytesToBits(byte[] b)
  5. bytesToBits(byte[] buf)