У меня есть байтовый массив в памяти, прочитанный из файла. Я хотел бы разбить массив байтов в определенной точке (индексе), не создавая новый массив байтов и не копируя каждый байт за один раз, увеличивая длину записи в памяти операции. Я бы хотел, чтобы это было так:
byte[] largeBytes = [1,2,3,4,5,6,7,8,9];
byte[] smallPortion;
smallPortion = split(largeBytes, 3);
smallPortion
будет равно 1,2,3,4 largeBytes
будет равняться 5,6,7,8,9