ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(bos, "UTF-8");
try{
painter.paint(g2d);
configureSVGGraphics2D(g2d);
g2d.stream(osw);
osw.flush();
bos.flush();
bos.close();
}catch(Exception e){
StringWriter trace = new StringWriter();