public class TextTagCodec extends Object
| Constructor and Description |
|---|
TextTagCodec() |
| Modifier and Type | Method and Description |
|---|---|
Map.Entry<String,Object> |
decode(String tag)
Convert typed tag in SAM text format (name:type:value) into tag name and Object value representation.
|
String |
encode(String tagName,
Object value)
Convert in-memory representation of tag to SAM text representation.
|
String |
encodeUntypedTag(String tagName,
Object value)
Encode a standard header tag, which should not have a type field.
|
public String encode(String tagName, Object value)
tagName - Two-character tag name.value - Tag value as approriate Object subclass.public String encodeUntypedTag(String tagName, Object value)
tagName - 2-character String.value - Not necessarily a String. Some of these are integers but the type is implied by
the tagName. Converted to String with toString().public Map.Entry<String,Object> decode(String tag)
tag - SAM text format name:type:value tag.