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 ubytesToString(byte[] data, int offset, int len) {
        StringBuilder sb = new StringBuilder();
        if (len > 0) {
            int p = offset;
            sb.append(data[p++] & 0xFF);
            for (int i = 1; i < len; ++i) {
                sb.append(',').append(data[p++] & 0xFF);
            }
        }
        return sb.toString();
    }
}