Java ArrayList to Array byteArrayListToByteArray(ArrayList indata)

Here you can find the source of byteArrayListToByteArray(ArrayList indata)

Description

byte Array List To Byte Array

License

Creative Commons License

Declaration

public static byte[] byteArrayListToByteArray(ArrayList<Byte> indata) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

import java.util.ArrayList;

public class Main {
    public static byte[] byteArrayListToByteArray(ArrayList<Byte> indata) {
        byte[] temp = new byte[indata.size()];
        for (int i = 0; i < temp.length; i++)
            temp[i] = (byte) indata.get(i).byteValue();
        return temp;
    }/*  w  ww .j a v a 2 s .  com*/
}

Related

  1. byteArrayListToCharToString(ArrayList byteArrayList)
  2. convertArrayListToHexString(ArrayList al)
  3. convertArrayListToIntArray(ArrayList al)
  4. convertIntArrayList2array(ArrayList alInput)