Java Byte Array Dump dump(byte[] str)

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

Description

dump

License

Open Source License

Declaration

static public String dump(byte[] str) 

Method Source Code

//package com.java2s;

public class Main {
    static public String dump(byte[] str) {
        if (str == null)
            return null;
        StringBuilder data = new StringBuilder();
        for (byte b : str) {
            String hex = Integer.toHexString((int) b);
            data.append(hex); //System.out.print(hex);
        }/*from  w  w w . j  av  a 2  s.c  o  m*/
        return data.toString();
    }
}

Related

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