Skip to content
Snippets Groups Projects
Commit f882b12c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

proper conversion to input string added

parent 19d46794
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!512Resolve "Export to SBGN does not export compartments and some reactions"
......@@ -3,12 +3,14 @@
*/
package lcsb.mapviewer.converter.model.sbgnml;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import javax.xml.bind.JAXBException;
......@@ -16,7 +18,6 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.tools.ant.filters.StringInputStream;
import org.sbgn.SbgnUtil;
import org.sbgn.bindings.Sbgn;
......@@ -76,7 +77,7 @@ public class SbgnmlXmlConverter implements IConverter {
StringEscapeUtils.escapeXml(notes.toString()) + "\n</html:body></notes> ";
xml = xml.substring(0, position) + notesNode + xml.substring(position, xml.length());
}
result = new StringInputStream(xml);
result = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8));
}
return result;
} catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment