Descriptor

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.si
Class Descriptor

    java.lang.Object
      org.ocap.si.Descriptor

    public abstract class Descriptor

extends Object

This class represents an MPEG-2 descriptor.

Constructor Summary
`Descriptor()`

Method Summary
`abstract byte` | `getByteAt(int index)` Get a particular byte within the descriptor content.
`abstract byte[]` | `getContent()` Get the data contained within this descriptor.
`abstract short` | `getContentLength()` Get the descriptor_length field.
`abstract short` | `getTag()` Get the descriptor_tag field.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Descriptor

    public Descriptor()

Method Detail

### getTag

    public abstract short getTag()

  Get the descriptor_tag field. Eight bit field that identifies each descriptor. The range of valid MPEG-2 descriptor tag values is 0x2 through 0xFF.

  Returns:
    The descriptor tag.

### getContentLength

    public abstract short getContentLength()

  Get the descriptor_length field. Eight bit field specifying the number of bytes of the descriptor immediately following the descriptor_length field.

  Returns:
    The descriptor length.

### getContent

    public abstract byte[] getContent()

  Get the data contained within this descriptor. The data is returned in an array of bytes and consists of the data immediately following the descriptor_length field with length indicated by that field.

  Returns:
    The descriptor data.

### getByteAt

    public abstract byte getByteAt(int index)
                            throws IndexOutOfBoundsException

  Get a particular byte within the descriptor content. The data is returned in a byte which is located at the position specified by an index parameter in the data content immediately following the descriptor_length field.

  Parameters:
    `index` - An index to the descriptor content. Value 0 corresponds to the first byte after the length field.
  Returns:
    The required byte data.
  Throws:
    `IndexOutOfBoundsException` - if index < 0 or index >= ContentLength

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD