CSJ2K.j2k.image.input.ImgReaderPPM.skipCommentAndWhiteSpace C# (CSharp) Method

skipCommentAndWhiteSpace() private method

Skips any line in the header starting with '#' and any space, tab, line feed or carriage return.
private skipCommentAndWhiteSpace ( ) : void
return void
        private void skipCommentAndWhiteSpace()
        {
            bool done = false;
            byte b;

            while (!done)
            {
                b = countedByteRead();
                if (b == 35)
                {
                    // Comment start
                    while (b != 10 && b != 13)
                    {
                        // While not comment end (end-of-line)
                        b = countedByteRead();
                    }
                }
                else if (!(b == 9 || b == 10 || b == 13 || b == 32))
                {
                    // If not whitespace
                    done = true;
                }
            }
            // Put back last valid byte
            offset--;
            in_Renamed.Seek(offset, System.IO.SeekOrigin.Begin);
        }