Re: [Cdk-user] cdk 1.4.19 SDFWriter with StringWriter

2014-04-11 Thread John May
Hi Lochana, You need to close the buffer before getting the output. J public static String toSDfileString(ListIAtomContainer ms) throws IOException, CDKException { StringWriter sw = new StringWriter(); SDFWritersdw = new SDFWriter(sw); for (IAtomContainer m : ms){

[Cdk-user] cdk 1.4.19 SDFWriter with StringWriter

2014-04-10 Thread lochana menikarachchi
I observed the same behavior as this.. http://sourceforge.net/p/cdk/bugs/1197/   public static String iAtomContainerListToSDFString(ListIAtomContainer mfSDF) throws FileNotFoundException, CDKException, IOException      {        StringWriter sw = new StringWriter();      BufferedWriter bw = new