Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//PduUtils is distributed under the terms of the Apache License version 2.0

public class Main {
    public static String byteToPdu(int b) {
        StringBuffer sb = new StringBuffer();
        String s = Integer.toHexString(b & 0xFF);
        if (s.length() == 1) {
            sb.append("0");
        }
        sb.append(s);
        return sb.toString().toUpperCase();
    }
}