Process a content supplied by a reader and perform some sort of processing. It is important to know that you should use reader for processing instead of trying to access the resource original content using {@link Resource}, because this way you can ignore the other preProcessors from the chain.
It is not require to explicitly handle exception. When the processing fails, the following can happen:
- the exception is wrapped in {@link RuntimeException} and the processing chain is interrupted (by default)
- content remains unchanged (if {@link WroConfiguration#isIgnoreFailingProcessor()} is true)
It is not required to close the reader and writers, because these will be closed for you.
@param resource the original resource as it found in the model.
@param reader {@link Reader} used to read processed resource content.
@param writer {@link Writer} where used to write processed results.
@throws IOException when an exception occurs. The future version will change the exception type to {@link Exception}, because any exception may occur during processing. The processing failure will be handled based on value of {@link WroConfiguration#isIgnoreFailingProcessor()} configuration flag.