com.gcapmedia.dab.epg.binary
Class Attribute

java.lang.Object
  extended by com.gcapmedia.dab.epg.binary.Attribute
All Implemented Interfaces:
Encodable

public class Attribute
extends java.lang.Object
implements Encodable

Attribute binary encoding


Constructor Summary
Attribute(AttributeTag tag, Encodable value)
          Create a new attribute
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static Attribute fromBytes(ElementTag parent, byte[] bytes)
          Parse an object from its byte array representation
static Attribute fromBytes(ElementTag parent, byte[] bytes, TokenTable tokens)
          Parse an object from its byte array representation
 byte[] getBytes()
           
 int getLength()
           
 AttributeTag getTag()
           
 Encodable getValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(AttributeTag tag,
                 Encodable value)
Create a new attribute

Parameters:
tag - Attribute tag
data - Attribute value
Method Detail

getTag

public AttributeTag getTag()
Returns:
Returns the attribute tag

getValue

public Encodable getValue()
Returns:
Returns the attribute value

getBytes

public byte[] getBytes()
Specified by:
getBytes in interface Encodable
Returns:
Returns the data as bytes
See Also:
Encodable.getBytes()

getLength

public int getLength()
Specified by:
getLength in interface Encodable
Returns:
Returns the length of this data
See Also:
Encodable.getLength()

fromBytes

public static Attribute fromBytes(ElementTag parent,
                                  byte[] bytes)
Parse an object from its byte array representation

Parameters:
parent - Tag parent
bytes - Byte array representation

fromBytes

public static Attribute fromBytes(ElementTag parent,
                                  byte[] bytes,
                                  TokenTable tokens)
Parse an object from its byte array representation

Parameters:
parent - Tag parent
bytes - Byte array representation

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2007. All Rights Reserved.