RiakClient.Erlang.OtpInputStream.Peek C# (CSharp) Method

Peek() public method

Look ahead one position in the stream without consuming the byte found there.
public Peek ( ) : byte
return byte
        public byte Peek()
        {
            return Peek1();
        }

Usage Example

 public void Can_Peek(byte[] buf, bool want)
 {
     using (var s = new OtpInputStream(buf))
     {
         byte b = s.Read1();
         Assert.AreEqual(OtpExternal.VersionTag, b);
         b = s.Peek();
         Assert.AreEqual(OtpExternal.AtomTag, b);
         string atom = s.ReadAtom();
         Assert.AreEqual(want.ToString().ToLowerInvariant(), atom); 
     }
 }
All Usage Examples Of RiakClient.Erlang.OtpInputStream::Peek