public interface BinaryService extends RetrievalService<Binary>
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<MessageDigest> |
calculateDigest(IRI identifier,
MessageDigest algorithm)
Calculate the digest for a binary object.
|
String |
generateIdentifier()
Get a new identifier.
|
CompletionStage<Void> |
purgeContent(IRI identifier)
Purge the content from its corresponding datastore.
|
CompletionStage<Void> |
setContent(BinaryMetadata metadata,
InputStream stream)
Set the content for a binary object.
|
default CompletionStage<MessageDigest> |
setContent(BinaryMetadata metadata,
InputStream stream,
MessageDigest algorithm)
Set the content for a binary object using a digest algorithm.
|
Set<String> |
supportedAlgorithms()
Get a list of supported algorithms.
|
getCompletionStage<Void> setContent(BinaryMetadata metadata, InputStream stream)
metadata - the binary metadatastream - the contentdefault CompletionStage<MessageDigest> setContent(BinaryMetadata metadata, InputStream stream, MessageDigest algorithm)
metadata - the binary metadatastream - the contextalgorithm - the digest algorithmInputStream.CompletionStage<Void> purgeContent(IRI identifier)
identifier - the binary object identifierCompletionStage will complete exceptionally and can be handled with
CompletionStage.handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>), CompletionStage.exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>) or similar methods.CompletionStage<MessageDigest> calculateDigest(IRI identifier, MessageDigest algorithm)
identifier - the identifieralgorithm - the algorithmSet<String> supportedAlgorithms()
String generateIdentifier()