Java Byte Array Print printbyte(byte[] b)

Here you can find the source of printbyte(byte[] b)

Description

Prints a byte array to the console

License

Open Source License

Parameter

Parameter Description
b the array to print

Declaration

public static void printbyte(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w  w  w.  j  a v a 2s.c  o m*/
     * Prints a byte array to the console
     * @param b the array to print
     */
    public static void printbyte(byte[] b) {
        System.out.print("[");
        for (int i = 0; i < b.length - 1; i++) {
            System.out.print(b[i] + ":");
        }
        System.out.println(b[b.length - 1] + "]");
    }
}

Related

  1. printByte(byte[] bytes)
  2. printByteArray(byte b[])
  3. printByteArray(byte[] bytes)
  4. printByteArray(byte[] bytes)