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

Vlad Dumitrescu vladdu55@REDACTED
Mon Apr 19 16:13:34 CEST 2010


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