Here you can find the source of byteBufferToByteArray(List
public static ArrayList<byte[]> byteBufferToByteArray(List<ByteBuffer> byteBufferList)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; public class Main { public static ArrayList<byte[]> byteBufferToByteArray(List<ByteBuffer> byteBufferList) { List<byte[]> result = new ArrayList<byte[]>(); for (ByteBuffer buf : byteBufferList) { result.add(buf.array());/* ww w . j a va2s .c o m*/ } return (ArrayList<byte[]>) result; } }