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 toStringWithLength(byte[] b, int pos, int length) {
        StringBuilder str = new StringBuilder();

        for (int i = 0; i < length; i++) {
            str.append((char) b[pos + i]);
        }

        String ret = str.toString();
        return ret;
    }
}