Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static ArrayList<Byte> toByteArray(byte[] data) {
        ArrayList<Byte> rval = new ArrayList<>(data.length);
        for (int i = 0; i < data.length; i++) {
            rval.add(i, new Byte(data[i]));
        }
        return rval;
    }
}