public interface DigitalObject
extends java.util.function.Supplier<java.io.InputStream>
Modifier and Type | Method and Description |
---|---|
static DigitalObject |
fromBytes(java.lang.String referenceInformation,
byte[] bytes)
Create a DigitalObject from bytes.
|
static DigitalObject |
fromFile(java.lang.String referenceInformation,
java.io.File file)
Create a DigitalObject from a file.
|
static DigitalObject |
fromPath(java.lang.String referenceInformation,
java.nio.file.Path path)
Create a DigitalObject from a path to a file.
|
static DigitalObject |
fromResource(java.lang.String referenceInformation,
java.lang.Class<?> type,
java.lang.String resourceName)
Create a DigitalObject from a classpath resource.
|
static DigitalObject |
fromString(java.lang.String referenceInformation,
java.lang.String value,
java.nio.charset.Charset charset)
Create a DigitalObject from a string.
|
static DigitalObject |
fromSupplier(java.lang.String referenceInformation,
java.util.function.Supplier<java.io.InputStream> supplier)
Create a DigitalObject from a supplier.
|
java.lang.String |
getReferenceInformation()
A unique identifier for this object that can be used as Reference Information.
|
java.lang.String getReferenceInformation()
static DigitalObject fromFile(java.lang.String referenceInformation, java.io.File file)
referenceInformation
- The unique identifier to use as Reference Informationfile
- The file that holds the content of the DigitalObjectstatic DigitalObject fromSupplier(java.lang.String referenceInformation, java.util.function.Supplier<java.io.InputStream> supplier)
referenceInformation
- The unique identifier to use as Reference Informationsupplier
- The supplier of the content of the DigitalObjectstatic DigitalObject fromPath(java.lang.String referenceInformation, java.nio.file.Path path)
referenceInformation
- The unique identifier to use as Reference Informationpath
- The path to the file that holds the content of the DigitalObjectstatic DigitalObject fromBytes(java.lang.String referenceInformation, byte[] bytes)
referenceInformation
- The unique identifier to use as Reference Informationbytes
- The content of the DigitalObjectstatic DigitalObject fromString(java.lang.String referenceInformation, java.lang.String value, java.nio.charset.Charset charset)
referenceInformation
- The unique identifier to use as Reference Informationvalue
- The string that holds the content of the DigitalObjectcharset
- The encoding of the given string valuestatic DigitalObject fromResource(java.lang.String referenceInformation, java.lang.Class<?> type, java.lang.String resourceName)
referenceInformation
- The unique identifier to use as Reference Informationtype
- The type loaded by a classloader that has access to the resourceresourceName
- The name of the resource on the classpath