public static void print(ByteBuffer bytes,PrintStream out,int offset,int length){
  for (int i=offset; i < offset + length; i++) {
    print(bytes.get(i),out);
    if ((i - offset + 1) % 32 == 0) {
      out.println();
    }
 else     if ((i - offset + 1) % 8 == 0) {
      out.print("    ");
    }
 else {
      out.print(" ");
    }
  }
}

public static void print ( ByteBuffer bytes , PrintStream out , int offset , int length ) { for ( int i = offset ; i < offset + length ; i ++ ) { print ( bytes . get ( i ) , out ) ; if ( ( i - offset + 1 ) % 32 == 0 ) { out . println ( ) ; } else if ( ( i - offset + 1 ) % 8 == 0 ) { out . print ( "    " ) ; } else { out . print ( " " ) ; } } }
print a subsection of a byte buffer as nicely formatted groups of hex numbers . output looks like : < p > 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08
