

public class Main {
	
    private static final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray();
    
    public static String toString(int n) {
        char[] buf = new char[8];
        for (int i = 7; i >= 0; i--) {
           buf[i] = HEX_DIGITS[n & 0x0F];
           n >>>= 4;
        }
        return new String(buf);
     }

	public static String toString(byte[] ba) {
	    return toString(ba, 0, ba.length);
    }
	
	public static final String toString(byte[] ba, int offset, int length) {
	    char[] buf = new char[length * 2];
	    for (int i = 0, j = 0, k; i < length; ) {
	       k = ba[offset + i++];
	       buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F];
	       buf[j++] = HEX_DIGITS[ k        & 0x0F];
	    }
	    return new String(buf);
	}
	
	public static void main(String[] args) {
	
        new GUI();
    }

}

