aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth/Couscous/Adapters.cs
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-17 18:57:29 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-17 18:58:12 +0100
commit52140d52210eda0f25ecab9f89b5c73473e9d8e0 (patch)
treecb383edb71e44b8ae7b2b0d0890f13574d1922f0 /dotnet/Mammoth/Couscous/Adapters.cs
parent0f9ef005f063198ea2e16ca36beaead4bd5e3824 (diff)
Add CLI for .NET version
Diffstat (limited to 'dotnet/Mammoth/Couscous/Adapters.cs')
-rw-r--r--dotnet/Mammoth/Couscous/Adapters.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/dotnet/Mammoth/Couscous/Adapters.cs b/dotnet/Mammoth/Couscous/Adapters.cs
index a613473..c45f35b 100644
--- a/dotnet/Mammoth/Couscous/Adapters.cs
+++ b/dotnet/Mammoth/Couscous/Adapters.cs
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using Mammoth.Couscous.java.lang;
using Mammoth.Couscous.java.util;
+using Mammoth.Couscous.java.io;
namespace Mammoth.Couscous {
internal static class FromJava {
@@ -82,5 +83,17 @@ namespace Mammoth.Couscous {
internal static java.util.List<T> ListToList<T>(IList<T> list) {
return new ArrayList<T>(list);
}
+
+ internal static java.io.InputStream StreamToInputStream(System.IO.Stream stream) {
+ return new StreamToInputStreamAdapter(stream);
+ }
+
+ private class StreamToInputStreamAdapter : InputStream {
+ public System.IO.Stream Stream { get; }
+
+ internal StreamToInputStreamAdapter(System.IO.Stream stream) {
+ Stream = stream;
+ }
+ }
}
}