Java Byte Array Dump dump(byte[] data, int pos, int length)

Here you can find the source of dump(byte[] data, int pos, int length)

Description

Dump a human-readable hex dump of data to standard out.

License

Open Source License

Parameter

Parameter Description
data The array to dump.
pos The position to begin writing from
length The count of bytes to dump.

Declaration

public static void dump(byte[] data, int pos, int length) 

Method Source Code

//package com.java2s;
// distribute, sublicense, and/or sell copies of the Software, and to

public class Main {
    /**//w  ww  .  java 2s. c o m
     * Dump a human-readable hex dump of data to standard out.
     * @param data   The array to dump.
     * @param pos    The position to begin writing from
     * @param length The count of bytes to dump.
     */
    public static void dump(byte[] data, int pos, int length) {
        for (int i = pos; i < length + pos; ++i) {
            System.out.printf("%X ", data[i]);
        }
        System.out.println("");
    }
}

Related

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