From 98b3ce6512812cd1d91c60ca0e69d69c32838d8e Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 23 May 2022 22:44:57 +0700 Subject: Work on Stream classes - consistent naming, ordering - CanRead/Seek/Write fixes - argument validation - some cases of blocking zero-byte Read calls --- crypto/src/util/io/NullOutputStream.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crypto/src/util/io/NullOutputStream.cs') diff --git a/crypto/src/util/io/NullOutputStream.cs b/crypto/src/util/io/NullOutputStream.cs index 13877fa13..c435549d2 100644 --- a/crypto/src/util/io/NullOutputStream.cs +++ b/crypto/src/util/io/NullOutputStream.cs @@ -5,14 +5,13 @@ namespace Org.BouncyCastle.Utilities.IO internal class NullOutputStream : BaseOutputStream { - public override void WriteByte(byte b) + public override void Write(byte[] buffer, int offset, int count) { - // do nothing + Streams.ValidateBufferArguments(buffer, offset, count); } - public override void Write(byte[] buffer, int offset, int count) + public override void WriteByte(byte value) { - // do nothing } } } -- cgit 1.5.1