private static byte[] concat(byte[]... arrays) {
        int length = 0;
        for (byte[] array : arrays) {
            length += array.length;
        }
        final byte[] res = new byte[length];
        int pos = 0;
        for (byte[] array : arrays) {
            System.arraycopy(array, 0, res, pos, array.length);
            pos += array.length;
        }
        return res;
    }
Concatenate the specified byte arrays.

@param arrays byte arrays to concatenate
@return resulting array of the concatenation
core/src/test/java/com/linecorp/armeria/common/multipart/MimeParserTest.java