protected void transcode ( File file , Transcoder transcoder ) throws IOException , TranscoderException { // Disable validation, performance is more important here (thumbnails!) transcoder . addTranscodingHint ( XMLAbstractTranscoder . KEY_XML_PARSER_VALIDATING , Boolean . FALSE ) ; SVGDocument doc = cloneDocument ( ) ; TranscoderInput input = new TranscoderInput ( doc ) ; OutputStream out = new BufferedOutputStream ( new FileOutputStream ( file ) ) ; TranscoderOutput output = new TranscoderOutput ( out ) ; transcoder . transcode ( input , output ) ; out . flush ( ) ; out . close ( ) ; }
Transcode a document into a file using the given transcoder .