Skip to content

Instantly share code, notes, and snippets.

@I3rixon
Created July 29, 2013 00:46
Show Gist options
  • Select an option

  • Save I3rixon/6101489 to your computer and use it in GitHub Desktop.

Select an option

Save I3rixon/6101489 to your computer and use it in GitHub Desktop.

Revisions

  1. I3rixon created this gist Jul 29, 2013.
    15 changes: 15 additions & 0 deletions Main.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    public static void prettyOut(byte[] msg) {
    for (int j = 1; j < msg.length+1; j++) {
    if (j % 8 == 1 || j == 0) {
    if( j != 0){
    System.out.println();
    }
    System.out.format("0%d\t|\t", j / 8);
    }
    System.out.format("%02X", msg[j-1]);
    if (j % 4 == 0) {
    System.out.print(" ");
    }
    }
    System.out.println();
    }