System.IO.Stream <==> java.io.InputStream/OutputStream

Hi;

So you have wrapper classes where like:

DotNetStreamWrapper (java.io.InputStream stream) : implements System.IO.Stream

JavaStreamWrapper (System.IO.Stream stream) : implements java.io.InputStream

And same question for Enumeration <==> Iterator.

- thanks - dave


Answer this question

System.IO.Stream &lt;==&gt; java.io.InputStream/OutputStream

  • Xloouch

    Yes please. And any other classes that convert between .net and java.

    thanks - dave

  • thepitzaboy

    Sure.

    1) My java code all uses InputStream/OutputStream in it's API. But I have a C# wrapper that provides the API as Stream as that is what people in the .NET world use. So I put the passed in Stream in an InputStream wrapper and pass it through.

    2) I need to pass an InputStream to a .NET methos which accepts a Stream. So I put it in a Stream wrapper and pass it in.

    3) Same thing for Iterator/Enumeration.

    I have code that does this - I just would prefer that it be in your code so if there are optimizations you can do under the covers, you could do them.

    thanks - dave

  • ASPman

    Hi Dave,

    Just to understand your question better,

    Do you want to know if these wrapper classes ship with Visual J#

    Thanks,
    Varun [MSFT]

  • Angry SQL 2005 User

    Hi Dave



    We do not support wrappers as mentioned by you, to get a java.io.InputStream from an existing System.IO.Stream or vice versa.



    We would be interested in knowing the scenario is your case, which requires such a functionality. We have had similar requests from people before and we were/are investigating on the same. As of now, the issues that are blocking us from pushing it further are not merely technical.



    Thanks for your request/feedback. We will update if we have something new on this.



    With regards

    Ashwin

    Microsoft Visual J# .NET product team

  • Bob ONeill

    Hi Dave

    Thanks for the feedback and the information provided.

    We will update have more information on this, as mentioned the the previous post.

    With regards
    Ashwin

  • System.IO.Stream &lt;==&gt; java.io.InputStream/OutputStream