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 ByteArrayToString(byte[] arr) {
        StringBuffer sb = new StringBuffer();
        for (byte item : arr) {
            sb.append(String.format("%02X ", item & 0xFF));
        }

        return "{ " + sb.toString() + "}";
    }
}