Java ArrayList to Array toByteArray(ArrayList in)

Here you can find the source of toByteArray(ArrayList in)

Description

to Byte Array

License

Open Source License

Declaration

public static byte[] toByteArray(ArrayList<Byte> in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    public static byte[] toByteArray(ArrayList<Byte> in) {
        int n = in.size();
        byte ret[] = new byte[n];
        for (int x = 0; x < n; x++) {
            ret[x] = in.get(x);/*from  w  w  w.  j a  va2s.  com*/
        }
        return ret;
    }
}

Related

  1. listToIntArray(ArrayList list)
  2. toArray(ArrayList arrayList)
  3. toArray(ArrayList arrlist)
  4. toArray(ArrayList sigs)
  5. toBooleanArray(ArrayList items)
  6. toIntArray(ArrayList list)
  7. toIntArray(ArrayList array)
  8. toIntArray(ArrayList array)
  9. toIntArray(ArrayList input)