summary refs log tree commit diff
path: root/crypto/src/util/io/TeeOutputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/TeeOutputStream.cs')
-rw-r--r--crypto/src/util/io/TeeOutputStream.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/crypto/src/util/io/TeeOutputStream.cs b/crypto/src/util/io/TeeOutputStream.cs

index 5f447b18b..fc213ae55 100644 --- a/crypto/src/util/io/TeeOutputStream.cs +++ b/crypto/src/util/io/TeeOutputStream.cs
@@ -18,7 +18,6 @@ namespace Org.BouncyCastle.Utilities.IO this.tee = tee; } -#if PORTABLE protected override void Dispose(bool disposing) { if (disposing) @@ -28,14 +27,6 @@ namespace Org.BouncyCastle.Utilities.IO } base.Dispose(disposing); } -#else - public override void Close() - { - Platform.Dispose(output); - Platform.Dispose(tee); - base.Close(); - } -#endif public override void Write(byte[] buffer, int offset, int count) { @@ -43,7 +34,15 @@ namespace Org.BouncyCastle.Utilities.IO tee.Write(buffer, offset, count); } - public override void WriteByte(byte value) +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public override void Write(ReadOnlySpan<byte> buffer) + { + output.Write(buffer); + tee.Write(buffer); + } +#endif + + public override void WriteByte(byte value) { output.WriteByte(value); tee.WriteByte(value);