This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String hexdump(byte[] data) { | |
final int perRow = 16; | |
final String hexChars = "0123456789ABCDEF"; | |
StringBuilder dump = new StringBuilder(); | |
StringBuilder chars = null; | |
for (int i = 0; i < data.length; i++) { | |
int offset = i % perRow; | |
if (offset == 0) { | |
chars = new StringBuilder(); |