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 bytesToString(byte[] value) {
        String result = "";
        if (value == null)
            return "<empty>";

        for (byte b : value) {
            if (result.length() == 0)
                result += Integer.toString(b);
            else
                result += ":" + Integer.toString(b);
        }
        return result;
    }
}