com.gcapmedia.dab.epg.binary
Class TokenTable

java.lang.Object
  extended by com.gcapmedia.dab.epg.binary.TokenTable
All Implemented Interfaces:
Encodable, java.lang.Iterable<Token>

public class TokenTable
extends java.lang.Object
implements Encodable, java.lang.Iterable<Token>


Field Summary
static byte TAG
          token table tag
 
Constructor Summary
TokenTable()
          Create a new token table type
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 byte[] expand(byte[] bytes)
          Expand a array of data using the values contained with the table
static TokenTable fromBytes(byte[] bytes)
          Parse a token table from its byte array representation
 byte[] getBytes()
           
 int getLength()
           
 Token getToken(TokenTag tag)
          Returns a token from its tag, null if it does not exist in the table
 boolean isFull()
           
 java.util.Iterator<Token> iterator()
           
 Token newToken(StringType value)
          Generate a new token from a string value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG

public static final byte TAG
token table tag

See Also:
Constant Field Values
Constructor Detail

TokenTable

public TokenTable()
Create a new token table type

Method Detail

getToken

public Token getToken(TokenTag tag)
Returns a token from its tag, null if it does not exist in the table

Parameters:
tag - Tag to search for
Returns:

newToken

public Token newToken(StringType value)
Generate a new token from a string value

Parameters:
value -
Returns:

isFull

public boolean isFull()
Returns:
Returns true if the table is full

getBytes

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

fromBytes

public static TokenTable fromBytes(byte[] bytes)
Parse a token table from its byte array representation


expand

public byte[] expand(byte[] bytes)
Expand a array of data using the values contained with the table

Parameters:
bytes -
Returns:

getLength

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

iterator

public java.util.Iterator<Token> iterator()
Specified by:
iterator in interface java.lang.Iterable<Token>
See Also:
Iterable.iterator()

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.