public byte[] toByteArray() throws IOException {final long len = length();if (Integer.MAX_VALUE < len)throw new OutOfMemoryError(JGitText.get().lengthExceedsMaximumArraySize);final byte[] out = new byte[(int) len];int outPtr = 0;for (Block b : blocks) {System.arraycopy(b.buffer, 0, out, outPtr, b.count);outPtr += b.count;}return out;}
public virtual byte[] ToByteArray(){long len = Length();if (int.MaxValue < len){throw new OutOfMemoryException(JGitText.Get().lengthExceedsMaximumArraySize);}byte[] @out = new byte[(int)len];int outPtr = 0;foreach (TemporaryBuffer.Block b in blocks){System.Array.Copy(b.buffer, 0, @out, outPtr, b.count);outPtr += b.count;}return @out;}