public class TextTagCodec
extends java.lang.Object
| Constructor and Description |
|---|
TextTagCodec() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map.Entry<java.lang.String,java.lang.Object> |
decode(java.lang.String tag)
Convert typed tag in SAM text format (name:type:value) into tag name and Object value representation.
|
java.lang.String |
encode(java.lang.String tagName,
java.lang.Object value)
Convert in-memory representation of tag to SAM text representation.
|
java.lang.String |
encodeUntypedTag(java.lang.String tagName,
java.lang.Object value)
Encode a standard header tag, which should not have a type field.
|
public java.lang.String encode(java.lang.String tagName,
java.lang.Object value)
tagName - Two-character tag name.value - Tag value as approriate Object subclass.public java.lang.String encodeUntypedTag(java.lang.String tagName,
java.lang.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 java.util.Map.Entry<java.lang.String,java.lang.Object> decode(java.lang.String tag)
tag - SAM text format name:type:value tag.