summary refs log tree commit diff
path: root/crypto/src/util/io/Streams.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/Streams.cs')
-rw-r--r--crypto/src/util/io/Streams.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/src/util/io/Streams.cs b/crypto/src/util/io/Streams.cs
index c23332909..da8f01068 100644
--- a/crypto/src/util/io/Streams.cs
+++ b/crypto/src/util/io/Streams.cs
@@ -3,14 +3,10 @@ using System.IO;
 
 namespace Org.BouncyCastle.Utilities.IO
 {
-	public sealed class Streams
+	public static class Streams
 	{
 		private const int BufferSize = 4096;
 
-		private Streams()
-		{
-		}
-
 		public static void Drain(Stream inStr)
 		{
 			inStr.CopyTo(Stream.Null, BufferSize);
@@ -64,7 +60,12 @@ namespace Org.BouncyCastle.Utilities.IO
 			return buf.ToArray();
 		}
 
-		public static byte[] ReadAllLimited(Stream inStr, int limit)
+        public static byte[] ReadAll(MemoryStream inStr)
+        {
+			return inStr.ToArray();
+        }
+
+        public static byte[] ReadAllLimited(Stream inStr, int limit)
 		{
 			MemoryStream buf = new MemoryStream();
 			PipeAllLimited(inStr, limit, buf);