public ReadN ( byte buffer ) : int | ||
buffer | byte | The buffer into which to read data. |
Résultat | 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)); } }