public interface BinaryService extends RetrievalService<Binary>
Modifier and Type | Method and Description |
---|---|
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.
|
get
CompletionStage<Void> setContent(BinaryMetadata metadata, InputStream stream)
metadata
- the binary metadatastream
- the contentCompletionStage<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.String generateIdentifier()