Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    /** Convert a Collection of Bytes to a primitive array byte[]. */
    public static byte[] unboxBytes(Collection<Byte> coll) {
        byte[] res = new byte[coll.size()];
        int i = 0;
        for (Byte elem : coll)
            res[i++] = elem;
        return res;
    }
}