* @see ResourceConfig#getIOManager()
* @throws IOException if the export fails.
*/
public void spool(OutputContext outputContext) throws IOException {
if (exists() && outputContext != null) {
ExportContext exportCtx = getExportContext(outputContext);
if (!config.getIOManager().exportContent(exportCtx, this)) {
throw new IOException("Unexpected Error while spooling resource.");
}
}
}