protected Reader generateResourceForDebug ( Reader rd , GeneratorContext context ) { // Rewrite the image URL StringWriter writer = new StringWriter ( ) ; try { IOUtils . copy ( rd , writer ) ; String content = rewriteUrl ( context , writer . toString ( ) ) ; rd = new StringReader ( content ) ; } catch ( IOException e ) { throw new BundlingProcessException ( e ) ; } return rd ; }
Returns the resource in debug mode . Here an extra step is used to rewrite the URL in debug mode