public final class DataEntity extends Object implements AutoCloseable
A binary large object is a collection of binary data stored as a single entity. Blobs are typically images, audio or other multimedia objects.
The mime-type indicates how to interpret the data 'blob'.
Constructor and Description |
---|
DataEntity(ByteBuffer data,
String mimeType)
Constructs the data entity.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
ByteBuffer |
getData()
Returns the data.
|
String |
getMimeType()
Returns the mime-type of the data.
|
public DataEntity(@NotNull ByteBuffer data, @NotNull String mimeType)
data
- the data.mimeType
- the mime-type of the data.public void close()
close
in interface AutoCloseable
@NotNull public ByteBuffer getData()
@NotNull public String getMimeType()