Java Byte Array Dump dumpBytes(byte[] data)

Here you can find the source of dumpBytes(byte[] data)

Description

dump Bytes

License

Open Source License

Declaration

public static void dumpBytes(byte[] data) 

Method Source Code

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

public class Main {
    public static void dumpBytes(byte[] data) {
        for (int i = 0; data != null && i < data.length; i++) {
            if (i % 8 == 0 && i != 0)
                System.out.println();
            if (i % 8 == 0)
                System.out.printf("%04d:", i);
            System.out.printf(" %3d", ((int) data[i]));
        }/*w w  w  .j  a v  a 2 s.c om*/
        System.out.println();
    }
}

Related

  1. dumpBytes(byte[] bytes)
  2. dumpBytes(byte[] bytes)
  3. dumpBytes(byte[] bytes, int maxLen)
  4. dumpBytes(byte[] bytes, int start, int length)
  5. dumpBytes(byte[] byts, int offset, int length)
  6. dumpBytes(byte[] data)
  7. dumpBytes(final byte[] bytes)
  8. dumpBytes(String headerStr, byte[] bytes)
  9. dumpBytesAsInt(byte[] b)