public class CompressedObjectTag extends java.lang.Object implements Tag<java.util.List<Tag<?>>>
Tags within a compressed object cannot be obtained using ObjectDataStructure.get(String)
or similar methods. Attempting to will result in a CompressedObjectException.
| Constructor and Description |
|---|
CompressedObjectTag(java.lang.String name)
Construct an compressed object tag with not existing tags.
|
CompressedObjectTag(java.lang.String name,
Compressor compressor)
Construct a compressed object tag with no existing tags.
|
CompressedObjectTag(java.lang.String name,
java.util.List<Tag<?>> value,
Compressor compressor)
Construct a compressed object tag with existing tags.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(Tag<?> t)
Add a tag to the object.
|
Tag<java.util.List<Tag<?>>> |
createFromData(java.nio.ByteBuffer value,
int length)
Turn an array of bytes into the Tag.
|
Compressor |
getCompressor()
Get the compressor used.
|
byte |
getID()
Get the ID of the tag.
|
java.lang.String |
getName()
Get the name of the tag.
|
Tag<?> |
getTag(java.lang.String name)
Get a tag from the object.
|
java.util.List<Tag<?>> |
getValue()
Get the value of the tag.
|
boolean |
hasTag(java.lang.String name)
If the object has a specified tag.
|
void |
removeAllTags()
Remove all tags from an object.
|
void |
removeTag(java.lang.String name)
Remove all tags that have the specified name.
|
void |
removeTag(Tag<?> tag)
Remove the specified tag from the object.
|
void |
setName(java.lang.String name)
Set the name of the tag
|
void |
setValue(java.util.List<Tag<?>> s)
Set the value of the tag
|
void |
writeData(java.io.DataOutputStream dos)
Write the data of the tag to an output stream.
|
public CompressedObjectTag(java.lang.String name,
java.util.List<Tag<?>> value,
Compressor compressor)
name - The name of the object.value - The list of tags to add.compressor - The compressor to use.public CompressedObjectTag(java.lang.String name,
Compressor compressor)
name - The name of the object.compressor - The compressor to use.public CompressedObjectTag(java.lang.String name)
GZIP Compression is used by default.
name - The name of the tag.public void addTag(Tag<?> t)
t - The tag to add.public Tag<?> getTag(java.lang.String name)
name - The name of the tag.public void removeTag(Tag<?> tag)
tag - The tag to remove.public void removeTag(java.lang.String name)
name - The name to remove.public void removeAllTags()
public boolean hasTag(java.lang.String name)
name - The tag's name.public Compressor getCompressor()
public void setValue(java.util.List<Tag<?>> s)
Tagpublic java.util.List<Tag<?>> getValue()
Tagpublic void setName(java.lang.String name)
Tagpublic java.lang.String getName()
Tagpublic void writeData(java.io.DataOutputStream dos)
throws java.io.IOException
Tagpublic Tag<java.util.List<Tag<?>>> createFromData(java.nio.ByteBuffer value, int length)
TagcreateFromData in interface Tag<java.util.List<Tag<?>>>value - The array of byteslength - The size of the value in bytes.