src/main/java/wycc/commands/Inspect.java
private void inspectBinaryFile(byte[] bytes) {
		for (int i = 0; i < bytes.length; i += width) {
			out.print(String.format("0x%04X ", i));
			// Print out databytes
			for (int j = 0; j < width; ++j) {
				if(j+i < bytes.length) {
					out.print(String.format("%02X ", bytes[i+j]));
				} else {
					out.print("   ");
				}
			}
			//
			for (int j = 0; j < width; ++j) {
				if(j+i < bytes.length) {
					char c = (char) bytes[i+j];
					if(c >= 32 && c < 128) {
						out.print(c);
					} else {
						out.print(".");
					}
				}
			}
			//
			out.println();
		}
	}
private void inspectBinaryFile(byte[] bytes) {
		for (int i = 0; i < bytes.length; i += width) {
			out.print(String.format("0x%04X ", i));
			// Print out databytes
			for (int j = 0; j < width; ++j) {
				if(j+i < bytes.length) {
					out.print(String.format("%02X ", bytes[i+j]));
				} else {
					out.print("   ");
				}
			}
			//
			for (int j = 0; j < width; ++j) {
				if(j+i < bytes.length) {
					char c = (char) bytes[i+j];
					if(c >= 32 && c < 128) {
						out.print(c);
					} else {
						out.print(".");
					}
				}
			}
			//
			out.println();
		}
	}
private void inspectBinaryFile ( byte [ ] bytes ) { for ( int i = 0 ; i < bytes . length ; i += width ) { out . print ( String . format ( "0x%04X " , i ) ) ; // Print out databytes for ( int j = 0 ; j < width ; ++ j ) { if ( j + i < bytes . length ) { out . print ( String . format ( "%02X " , bytes [ i + j ] ) ) ; } else { out . print ( "   " ) ; } } // for ( int j = 0 ; j < width ; ++ j ) { if ( j + i < bytes . length ) { char c = ( char ) bytes [ i + j ] ; if ( c >= 32 && c < 128 ) { out . print ( c ) ; } else { out . print ( "." ) ; } } } // out . println ( ) ; } }
Inspect a given binary file. That is a file for which we don't have a better
inspector.

@param bytes
Inspect a given binary file . That is a file for which we don t have a better inspector .