{"size": 1066, "ext": "js", "max_stars_repo_path": "src/platform/java-rhino/svg.js", "max_stars_repo_name": "thatcher/env-js", "max_stars_repo_stars_event_min_datetime": "2015-01-14T09:37:24.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-04T05:50:15.000Z", "max_issues_repo_path": "src/platform/java-rhino/svg.js", "max_issues_repo_name": "thatcher/env-js", "max_issues_repo_issues_event_min_datetime": "2015-09-10T23:23:46.000Z", "max_issues_repo_issues_event_max_datetime": "2018-04-23T17:47:38.000Z", "max_forks_repo_path": "src/platform/java-rhino/svg.js", "max_forks_repo_name": "thatcher/env-js", "max_forks_repo_forks_event_min_datetime": "2015-02-06T18:58:50.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-07T19:43:43.000Z"}
{"max_stars_count": 77, "max_issues_count": 1, "max_forks_count": 23, "avg_line_length": 31.3529411765, "max_line_length": 92, "alphanum_fraction": 0.6744840525}
Envjs.renderSVG = function(svgstring, url){
    //console.log("svg template url %s", templateSVG);
    // Create a JPEG transcoder
    var t = new Packages.org.apache.batik.transcoder.image.JPEGTranscoder();

    // Set the transcoding hints.
    t.addTranscodingHint(
        Packages.org.apache.batik.transcoder.image.JPEGTranscoder.KEY_QUALITY,
        new java.lang.Float(1.0));
    // Create the transcoder input.
    var input = new Packages.org.apache.batik.transcoder.TranscoderInput(
        new java.io.StringReader(svgstring));

    // Create the transcoder output.
    var ostream = new java.io.ByteArrayOutputStream();
    var output = new Packages.org.apache.batik.transcoder.TranscoderOutput(ostream);

    // Save the image.
    t.transcode(input, output);

    // Flush and close the stream.
    ostream.flush();
    ostream.close();
    
	var out = new java.io.FileOutputStream(new java.io.File(new java.net.URI(url.toString())));
	try{
    	out.write( ostream.toByteArray() );
	}catch(e){
		
	}finally{
    	out.flush();
    	out.close();
    }
};