CSJ2K.j2k.util.ISRandomAccessIO.readFully C# (CSharp) Метод

readFully() публичный Метод

Reads 'len' bytes of data from this file into an array of bytes. This method reads repeatedly from the stream until all the bytes are read. This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.
If the end-of file was reached before getting /// all the necessary data. /// /// If an I/O error ocurred. /// ///
public readFully ( byte b, int off, int n ) : void
b byte The buffer into which the data is to be read. It must be long /// enough. /// ///
off int The index in 'b' where to place the first byte read. /// ///
n int
Результат void
        public virtual void readFully(byte[] b, int off, int n)
        {
            if (pos + n <= len)
            {
                // common, fast case
                Array.Copy(buf, pos, b, off, n);
                pos += n;
                return ;
            }
            // general case
            while (!complete && pos + n > len)
            {
                readInput();
            }
            if (pos + n > len)
            {
                throw new System.IO.EndOfStreamException();
            }
            Array.Copy(buf, pos, b, off, n);
            pos += n;
        }