Java List Union union(List byteList)

Here you can find the source of union(List byteList)

Description

union

License

Open Source License

Declaration

public static byte[] union(List<byte[]> byteList) 

Method Source Code


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

public class Main {
    public static byte[] union(List<byte[]> byteList) {
        int size = 0;
        for (byte[] bs : byteList) {
            size += bs.length;/*  w w w .j  av  a2 s .co m*/
        }
        byte[] ret = new byte[size];
        int pos = 0;
        for (byte[] bs : byteList) {
            System.arraycopy(bs, 0, ret, pos, bs.length);
            pos += bs.length;
        }
        return ret;
    }
}

Related

  1. union(final List list1, final List list2)
  2. union(final List list1, final List list2)
  3. union(final List... lists)
  4. Union(List A, List B)
  5. union(List ls, List ls2)
  6. union(List list1, List list2, boolean duplicate)
  7. union(List set1, List set2)
  8. union(List... lists)
  9. unionAdd(List vect, E obj)