Hi Tim,

That constructor is expecting a C++ stream pointer. The takeOwnership flag
tells it to take assume ownership of the pointer (i.e. to free up the
memory being used by the stream when the SDWriter itself is free'd). I am
guessing that this will not be useable from Java (and should probably be
disabled).

There is likely a way to set up the wrappers so that Java streams are
properly handled, but it's difficult to assess how much work that would be.

-greg


On Wed, Mar 30, 2016 at 2:00 PM, Tim Dudgeon <[email protected]> wrote:

> Hi All,
>
> this probably a pretty basic question, but I'm struggling to work out
> how to use the SDWriter from Java.
> The class that SWIG has generated for SDWriter has a constructor of type:
> SDWriter(SWIGTYPE_p_std__ostream outstream)
> which looks like its the one I need (I need to write to a Java
> OutputStream, not a file).
> But I can't would out how to generate an instance of
> SWIGTYPE_p_std__ostream from my Java OutputStream.
> Any pointers?
>
> (Also, what does the boolean takeownership param of the similar
> constructor do?)
>
>
> Tim
>
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to