Here you can find the source of asByteArray(final List
Parameter | Description |
---|---|
l | list |
public static byte[] asByteArray(final List<Byte> l)
//package com.java2s; import java.util.List; public class Main { /**/*from ww w .ja v a 2s . c o m*/ * Return list of boxed bytes as a primitive array. * * @param l list * @return byte array */ public static byte[] asByteArray(final List<Byte> l) { final byte[] a = new byte[l.size()]; for (int i = 0; i < a.length; i++) { a[i] = l.get(i); } return a; } }