Most compositions and to a

private static byte[] byteMergerAll(List<byte[]> values) {
    int length_byte = 0;
    for (int i = 0; i < values.size(); i++) {
        length_byte += values.get(i).length;
    }
    byte[] all_byte = new byte[length_byte];
    int countLength = 0;
    for (int i = 0; i < values.size(); i++) {
        byte[] b = values.get(i);
        System.arraycopy(b, 0, all_byte, countLength, b.length);
        countLength += b.length;
    }
    return all_byte;
}
Published 66 original articles · won praise 85 · Views 140,000 +

Guess you like

Origin blog.csdn.net/qq_38380025/article/details/100032019