Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String makeDeviceID(byte[] bytes) {
        if (bytes.length < 12)
            return "";
        StringBuffer sb = new StringBuffer();
        for (byte b : bytes) {
            sb.append(Integer.toHexString((b & 0xFF) | 0xFFFFFF00).substring(6).toUpperCase());
        }
        return sb.toString();
    }
}