Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String toHexString(byte[] paramArrayOfByte) {
        int i = paramArrayOfByte.length * 2;
        StringBuffer localStringBuffer1 = new StringBuffer(i);
        int j = 0;
        while (true) {
            int k = paramArrayOfByte.length;
            if (j >= k)
                return localStringBuffer1.toString().toLowerCase();
            int m = paramArrayOfByte[j] & 0xFF;
            if (m < 16)
                localStringBuffer1.append(48);
            String str = Integer.toHexString(m);
            StringBuffer localStringBuffer3 = localStringBuffer1.append(str);
            j += 1;
        }
    }
}