[erlang-questions] Convert an OtpErlangBinary object to Java InputStream

zabrane Mikael zabrane3@REDACTED
Mon Apr 19 17:14:56 CEST 2010


Thanks Vlad.
It works !!!

Now, how about to convert an UTF8 String to OtpErlangBinary() ?


2010/4/19 Vlad Dumitrescu <vladdu55@REDACTED>

> Hi!
>
> On Mon, Apr 19, 2010 at 16:02, zabrane Mikael <zabrane3@REDACTED> wrote:
> > Does someone knows how to build a Java InputStream object
> > from an OtpErlangBinary object?
>
> Try something like
>
> OtpErlangBinary bin    = (OtpErlangBinary)(msg.elementAt(0));
> InputStream is = new ByteArrayInputStream(bin.binaryValue());
>
> regards,
> Vlad
>


More information about the erlang-questions mailing list