User afeef30056
06-09-2007 09:52:57
Hi,
I'm using
chemaxon.formats.MolImporter,
chemaxon.struc.Molecule,chemaxon.formats.*,
chemaxon.util.*
for designing smiles in web.
But I not obtain any image when in my smiles I have "#".
This is my code:
....
// Setting content type
String type = format.indexOf(":") == -1 ?
format : format.substring(0, format.indexOf(":"));
response.setContentType("image/" + type);
Molecule mol = null;
if(molstring == null) {
File f = new File(filename);
MolImporter mi = new MolImporter(f,"");
mol = mi.read();
} else {
mol = MolImporter.importMol(molstring);
}
if(mol.getDim()==0) {
mol.clean(2, "O1");
}
byte[] b = mol.toBinFormat(format);
ServletOutputStream outs = response.getOutputStream();
outs.flush();
outs.write(b,0,b.length);
outs.close();
....
I'm using an old version of your jar?
Thanks,Cristina
I'm using
chemaxon.formats.MolImporter,
chemaxon.struc.Molecule,chemaxon.formats.*,
chemaxon.util.*
for designing smiles in web.
But I not obtain any image when in my smiles I have "#".
This is my code:
....
// Setting content type
String type = format.indexOf(":") == -1 ?
format : format.substring(0, format.indexOf(":"));
response.setContentType("image/" + type);
Molecule mol = null;
if(molstring == null) {
File f = new File(filename);
MolImporter mi = new MolImporter(f,"");
mol = mi.read();
} else {
mol = MolImporter.importMol(molstring);
}
if(mol.getDim()==0) {
mol.clean(2, "O1");
}
byte[] b = mol.toBinFormat(format);
ServletOutputStream outs = response.getOutputStream();
outs.flush();
outs.write(b,0,b.length);
outs.close();
....
I'm using an old version of your jar?
Thanks,Cristina