Java Byte Array Dump dumpArray(byte b[])

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

Description

dump Array

License

Open Source License

Declaration

public static String dumpArray(byte b[]) 

Method Source Code

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

public class Main {
    public static String dumpArray(byte b[]) {
        return dumpArray(b, 0, b.length);
    }/* w  w w.  j a v  a2 s .c om*/

    public static String dumpArray(byte b[], int pos, int len) {
        StringBuilder sb = new StringBuilder();
        sb.append('[');
        for (int i = pos; i < len; i++) {
            if (i > 0)
                sb.append(",");
            sb.append(b[i]);
        }
        sb.append(']');
        return sb.toString();
    }
}

Related

  1. dump(byte[] data, int offset, int length)
  2. dump(byte[] data, int pos, int length)
  3. dump(byte[] mem, int start, int len)
  4. dump(byte[] rec)
  5. dump(byte[] str)
  6. dumpArray(byte[] b)
  7. dumpArray(byte[] buffer, boolean breakLines)
  8. dumpByteArray(byte[] ab)
  9. dumpByteArray(byte[] b)