public class ZMetadata
extends java.lang.Object
| Constructor and Description |
|---|
ZMetadata() |
ZMetadata(Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bytes() |
void |
clear()
Removes all the properties.
|
boolean |
containsKey(java.lang.String property)
Returns
true if this metada contains the property requested |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
entrySet()
Returns a
Set view of the properties contained in this metadata. |
boolean |
equals(java.lang.Object o) |
java.lang.String |
get(java.lang.String key) |
int |
hashCode() |
boolean |
isEmpty()
Returns
true if this map contains no key-value mappings. |
java.util.Set<java.lang.String> |
keySet() |
static ZMetadata |
read(java.lang.String meta) |
static ZMetadata |
read(ZConfig conf) |
void |
remove(java.lang.String key) |
void |
set(Metadata zapProperties) |
void |
set(java.lang.String key,
java.lang.String value) |
int |
size()
Returns the number of properties.
|
java.lang.String |
toString() |
java.util.Collection<java.lang.String> |
values()
Returns a
Collection view of the values contained in this metadata. |
void |
write(java.io.OutputStream stream)
Serialize metadata to an output stream, using the specifications of the ZMTP protocol
|
private final Metadata metadata
public ZMetadata()
public ZMetadata(Metadata metadata)
public java.util.Set<java.lang.String> keySet()
public java.lang.String get(java.lang.String key)
public void set(java.lang.String key,
java.lang.String value)
public void remove(java.lang.String key)
public byte[] bytes()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()
Set view of the properties contained in this metadata.
The set is backed by the metadata, so changes to the metadata are
reflected in the set, and vice-versa. If the metadata is modified
while an iteration over the set is in progress (except through
the iterator's own remove operation, or through the
setValue operation on a metadata property returned by the
iterator) the results of the iteration are undefined. The set
supports element removal, which removes the corresponding
mapping from the metadata, via the Iterator.remove,
Set.remove, removeAll, retainAll and
clear operations. It does not support the
add or addAll operations.public java.util.Collection<java.lang.String> values()
Collection view of the values contained in this metadata.
The collection is backed by the metadata, so changes to the map are
reflected in the collection, and vice-versa. If the metadata is
modified while an iteration over the collection is in progress
(except through the iterator's own remove operation),
the results of the iteration are undefined. The collection
supports element removal, which removes the corresponding
property from the metadata, via the Iterator.remove,
Collection.remove, removeAll,
retainAll and clear operations. It does not
support the add or addAll operations.public void set(Metadata zapProperties)
public boolean isEmpty()
true if this map contains no key-value mappings.true if this map contains no key-value mappingspublic boolean containsKey(java.lang.String property)
true if this metada contains the property requestedproperty - property the name of the property to be tested.true if this metada contains the propertypublic void clear()
public int size()
Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.public void write(java.io.OutputStream stream)
throws java.io.IOException
property = name value name = OCTET 1*255name-char name-char = ALPHA | DIGIT | "-" | "_" | "." | "+" value = 4OCTET *OCTET ; Size in network byte order
stream - the output streamjava.io.IOException - if an I/O error occurs.java.lang.IllegalStateException - if one of the properties name size is bigger than 255public static ZMetadata read(java.lang.String meta)