Java Byte Array Dump dump(byte[] rec)

Here you can find the source of dump(byte[] rec)

Description

dump

License

Open Source License

Declaration

@SuppressWarnings({ "UnusedDeclaration" })
    public static void dump(byte[] rec) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU Lesser General Public License as published by

public class Main {
    @SuppressWarnings({ "UnusedDeclaration" })
    public static void dump(byte[] rec) {
        for (int i = 0; i < rec.length; i++) {

            String s = String.format("%02x", (0xFF & rec[i]));
            System.out.print("0x" + s + " ");
            if (((i + 1) % 16) == 0)
                System.out.println();
        }/*w  w w  . j a v  a  2s.c o  m*/
        System.out.println();
    }
}

Related

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