Java Byte Array Dump dumpByteArray(byte[] buffer)

Here you can find the source of dumpByteArray(byte[] buffer)

Description

dump Byte Array

License

Open Source License

Declaration

public static String dumpByteArray(byte[] buffer) 

Method Source Code

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

public class Main {
    public static String dumpByteArray(byte[] buffer) {
        StringBuffer sb = new StringBuffer();
        sb.append("{ ");
        int len = buffer.length;
        for (int i = 0; i < len; i++) {
            if (i > 0)
                sb.append(", ");
            sb.append(buffer[i] & 0xff);
        }/*from   www.  j  a v a2 s. com*/
        sb.append(" }");
        return sb.toString();
    }
}

Related

  1. dumpArray(byte b[])
  2. dumpArray(byte[] b)
  3. dumpArray(byte[] buffer, boolean breakLines)
  4. dumpByteArray(byte[] ab)
  5. dumpByteArray(byte[] b)
  6. dumpByteArray(byte[] bytes)
  7. dumpByteArrayAsInts(byte[] arr)
  8. dumpBytes(byte bb[])
  9. dumpBytes(byte[] a)