Android List to Array Convert toByteArray(final List pItems)

Here you can find the source of toByteArray(final List pItems)

Description

to Byte Array

Declaration

public static final byte[] toByteArray(final List<Byte> pItems) 

Method Source Code

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

public class Main {
    public static final byte[] toByteArray(final List<Byte> pItems) {
        final byte[] out = new byte[pItems.size()];
        for (int i = out.length - 1; i >= 0; i--) {
            out[i] = pItems.get(i);//www  . jav a  2s  .  c  om
        }
        return out;
    }
}

Related

  1. toCharArray(final List pItems)
  2. toDoubleArray(final List pItems)
  3. toFloatArray(final List pItems)
  4. toIntArray(final List pItems)