Alexandria.Engines.Sciagi.Resources.PictureInstruction.PeekByte C# (CSharp) Method

PeekByte() protected static method

Peek at a byte without reading it.
protected static PeekByte ( Stream stream ) : byte
stream Stream
return byte
        protected static byte PeekByte(Stream stream)
        {
            int value = stream.ReadByte();
            if (value < 0)
                return 0xFF;
            stream.Seek(-1, SeekOrigin.Current);
            return (byte)value;
        }