Java Array Dump dumpInt(String name, int[] src)

Here you can find the source of dumpInt(String name, int[] src)

Description

dump Int

License

Apache License

Declaration

public static void dumpInt(String name, int[] src) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void dumpInt(String name, int[] src) {
        System.out.println(String.format("%s: [", name));
        int col = 0;
        for (int i = 0; i < src.length; ++i) {
            if (col == 0) {
                System.out.format(" ");
            }/* w  w w  .  ja va2s. co  m*/
            System.out.format(" %08x", src[i]);
            col = (col + 1) % 8;
            if (col == 0) {
                System.out.println();
            }
        }
        if (col != 0) {
            System.out.println();
        }
        System.out.println("]");
    }
}

Related

  1. dumpData(byte data[])
  2. dumpFirst1024Byte(byte[] data)
  3. dumpGroups(String title, int[][] allGroups)
  4. dumpHex(byte[] data, int offset, int length)
  5. dumpHexString(final byte[] array)
  6. dumpIntArray(int[] A, int n)
  7. dumpIntArray(int[] data, String label)
  8. dumpMatrix(byte[] matrix, int numDataUnits, int numAllUnits)
  9. dumpMessage(byte b[])