public class Container extends Object
SecuredContainer. It has the content, header and metadata. The content
and header are not encrypted.| Constructor and Description |
|---|
Container(Metadata metadata,
byte[] content,
Header header)
Create a container with the given metadata, content and header.
|
Container(Metadata metadata,
byte[] content,
String customData)
Create a container with the given metadata, content and custom data (for the
Header). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Container container)
Checks if the passed in containers parts are equal to this containers parts (header, metadata, content and
syncedAt).
|
boolean |
equals(Object obj) |
byte[] |
getContent()
Get the content of this container.
|
String |
getCustomData()
Get the custom data of this container's
Header. |
Header |
getHeader()
Get the containers
Header. |
UUID |
getId()
Get the unique id of the container.
|
Metadata |
getMetadata()
Get the container's
Metadata. |
org.threeten.bp.ZonedDateTime |
getSyncedAt()
Get the last time this container was synced with the Absio Broker™ application (using the
ServerProvider). |
int |
hashCode() |
void |
setContent(byte[] content)
Set the content of this container.
|
void |
setCustomData(String customData)
Set the custom data of this container's
Header. |
void |
setCustomData(String customData,
int version)
Set the custom data of this container's
Header. |
void |
setHeader(Header header)
Set the containers
Header. |
void |
setId(UUID id)
Set the unique id of the container
|
public Container(Metadata metadata, byte[] content, String customData)
Header).metadata - the metadata for the containercontent - the content for the containercustomData - the custom data for the Header portion of the containerpublic Container(Metadata metadata, byte[] content, Header header)
NOTE: the metadata must be defined or a IllegalArgumentException will be thrown
metadata - the metadata for the containercontent - the content for the containerheader - the header for the containerIllegalArgumentException - thrown if the metadata is nullpublic boolean equals(Container container)
container - the container to compare withpublic byte[] getContent()
public void setContent(byte[] content)
content - the content of this containerpublic String getCustomData()
Header.Headerpublic void setCustomData(String customData)
Header.customData - the custom data of this container's Headerpublic void setHeader(Header header)
Header.header - the containers Headerpublic UUID getId()
public void setId(UUID id)
id - the unique id of the containerpublic Metadata getMetadata()
Metadata.Metadatapublic org.threeten.bp.ZonedDateTime getSyncedAt()
ServerProvider).Copyright © 2021. All rights reserved.