Lucene.Net.Store.DataInput.ReadBytes C# (CSharp) 메소드

ReadBytes() 공개 추상적인 메소드

Reads a specified number of bytes into an array at the specified offset.
public abstract ReadBytes ( byte b, int offset, int len ) : void
b byte the array to read bytes into
offset int the offset in the array to start storing bytes
len int the number of bytes to read
리턴 void
        public abstract void ReadBytes(byte[] b, int offset, int len);

Same methods

DataInput::ReadBytes ( byte b, int offset, int len, bool useBuffer ) : void

Usage Example

예제 #1
0
        /// <summary>
        /// Copy numBytes bytes from input to ourself. </summary>
        public virtual void CopyBytes(DataInput input, long numBytes)
        {
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(numBytes >= 0, "numBytes={0}", numBytes);
            }
            long left = numBytes;

            if (copyBuffer == null)
            {
                copyBuffer = new byte[COPY_BUFFER_SIZE];
            }
            while (left > 0)
            {
                int toCopy;
                if (left > COPY_BUFFER_SIZE)
                {
                    toCopy = COPY_BUFFER_SIZE;
                }
                else
                {
                    toCopy = (int)left;
                }
                input.ReadBytes(copyBuffer, 0, toCopy);
                WriteBytes(copyBuffer, 0, toCopy);
                left -= toCopy;
            }
        }
All Usage Examples Of Lucene.Net.Store.DataInput::ReadBytes