@ Override public Void call ( ) throws Exception { OutputStream out = null ; InputStream in = null ; try { out = new FileOutputStream ( destination ) ; in = new FileInputStream ( source ) ; JasperCompileManager . compileReportToStream ( in , out ) ; if ( verbose ) { log . info ( "Compiling " + source . getName ( ) ) ; } } catch ( Exception e ) { cleanUpAndThrowError ( destination , e ) ; } finally { if ( out != null ) { out . close ( ) ; } if ( in != null ) { in . close ( ) ; } } return null ; }
Compile the source file . If the source file doesn t have the right extension it is skipped .