Ejemplo n.º 1
0
        internal static ReadWriteInt64ArrayBuffer Copy(Int64ArrayBuffer other, int markOfOther)
        {
            ReadWriteInt64ArrayBuffer buf = new ReadWriteInt64ArrayBuffer(other
                                                                          .Capacity, other.backingArray, other.offset);

            buf.limit    = other.Limit;
            buf.position = other.Position;
            buf.mark     = markOfOther;
            return(buf);
        }
Ejemplo n.º 2
0
        public static Int64Buffer Wrap(long[] array, int start, int len)
        {
            if (array == null)
            {
                throw new NullReferenceException();
            }
            if (start < 0 || len < 0 || (long)len + (long)start > array.Length)
            {
                throw new ArgumentOutOfRangeException();
            }

            Int64Buffer buf = new ReadWriteInt64ArrayBuffer(array);

            buf.position = start;
            buf.limit    = start + len;

            return(buf);
        }