use of org.sonatype.nexus.repository.view.payloads.BlobPayload in project nexus-repository-r by sonatype-nexus-community.
the class RFacetUtils method toContent.
/**
* Convert an asset blob to {@link Content}.
*
* @return content of asset blob
*/
static Content toContent(final Asset asset, final Blob blob) {
Content content = new Content(new BlobPayload(blob, asset.requireContentType()));
Content.extractFromAsset(asset, HASH_ALGORITHMS, content.getAttributes());
return content;
}
use of org.sonatype.nexus.repository.view.payloads.BlobPayload in project nexus-repository-r by sonatype-nexus-community.
the class RFacetUtils method toContent.
/**
* Convert an asset blob to {@link Content}.
*
* @return content of asset blob
*/
public static Content toContent(final Asset asset, final Blob blob) {
Content content = new Content(new BlobPayload(blob, asset.requireContentType()));
Content.extractFromAsset(asset, HASH_ALGORITHMS, content.getAttributes());
return content;
}
Aggregations