BytestreamCache bytestreamCache = readStream(transformed);
transformed.close();
ContentType contentType = rt == null
? new ContentType(contentTypeAnalyzer.getContentType(baseResource))
: rt.getTransformedContentType();
boolean compressable = compressionAnalyzer.isCompressable(contentType.getMimeType());
long lastModified = resourceChangeTracker.trackResource(baseResource);
return new StreamableResourceImpl(baseResource.toString(), contentType, compressable ? CompressionStatus.COMPRESSABLE
: CompressionStatus.NOT_COMPRESSABLE, lastModified, bytestreamCache, checksumGenerator, null);