public String getContentType() { return originalResource.getContentType(); } }
public String getContentType() { return originalResource.getContentType(); }
/** * Adapter, turns DownloadableResource into Content. */ public static Content asContent(final DownloadableResource downloadableResource, final SourceMap sourceMap, boolean isTransformed) { return new ContentImpl(downloadableResource.getContentType(), isTransformed) { @Override public SourceMap writeTo(OutputStream out, boolean isSourceMapEnabled) { try { downloadableResource.streamResource(out); } catch (DownloadException e) { Support.LOGGER.debug("Error while serving file: DownloadException"); } return sourceMap; } }; }