CSJ2K.j2k.io.BufferedRandomAccessFile.length C# (CSharp) Method

length() public method

Returns the current length of the stream, in bytes, taking into account any buffering.
If an I/O error ocurred. /// ///
public length ( ) : int
return int
        public virtual int length()
        {
            int len;

            len = (int) theFile.Length;

            // If the position in the buffer is not past the end of the file,
            // the length of theFile is the length of the stream
            if ((offset + maxByte) <= len)
            {
                return (len);
            }
            else
            {
                // If not, the file is extended due to the buffering
                return (offset + maxByte);
            }
        }