public ReadN ( byte buffer ) : int | ||
buffer | byte | The buffer into which to read data. |
return | int |
public int ReadN(byte[] buffer)
{
return ReadN(buffer, 0, buffer.Length);
}
OtpInputStream::ReadN ( byte buffer, int offset, int count ) : 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)); } }