byte[]...

public static byte[] concatAll(byte[] first, byte[]... rest)
{
	int totalLength = first.length;
	for (byte[] array : rest)
	{
		totalLength += array.length;
	}
	byte[] result = Arrays.copyOf(first, totalLength);
	int offset = first.length;
	for (byte[] array : rest)
	{
		System.arraycopy(array, 0, result, offset, array.length);
		offset += array.length;
	}
	return result;
}


阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页