ReadN() public method

Read an array of bytes from the stream into the buffer. The method reads at most buffer.Length bytes from the input stream.
public ReadN ( byte buffer ) : int
buffer byte The buffer into which to read data.
return int
 public void Read_Zero_Throws_At_End()
 {
     byte[] inbuf = { 0, 1, 2, 3 };
     byte[] outbuf = new byte[1];
     using (var s = new OtpInputStream(inbuf))
     {
         s.ReadN(outbuf);
         s.ReadN(outbuf);
         s.ReadN(outbuf);
         s.ReadN(outbuf);
         Assert.Throws(typeof(Exception), () => s.ReadN(outbuf, 0, 0));
     }
 }