IndexTableImpl (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.io.mxf.impl

## Class IndexTableImpl

- java.lang.Object
- - tv.amwa.maj.io.mxf.impl.IndexTableImpl

- All Implemented Interfaces:
    Cloneable, IndexTable, Padded

      public class IndexTableImpl
      extends Object
      implements IndexTable, Cloneable, Padded

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DeltaEntry[]` | `singleElementDelta`
    `static Rational` | `zeroProportion`

    - ### Fields inherited from interface tv.amwa.maj.io.mxf.IndexTable

      `indexPrimer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexTableImpl()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexTable` | `clone()` Create a cloned copy of this index table.
    `static IndexTable` | `createFromBuffer(ByteBuffer buffer)`
    `int` | `getIndexSID()` Returns the index stream identifier for this index table within its MXF file.
    `long` | `getPaddingFillSize()` Returns the number of padding bytes following a significant entry in a partition, such as a partition pack or index table.
    `void` | `setPaddingFillSize(long paddingFillSize)` Set the amount of padding to include after each significant entry in the partition, allowing space for the metadata to expand over time.
    `long` | `streamOffset(long position, int subStream)` Calculate the byte offset in the indexed stream of the frame at the given position.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### zeroProportion

          public static final Rational zeroProportion

    - #### singleElementDelta

          public static final DeltaEntry[] singleElementDelta

  - ### Constructor Detail

    - #### IndexTableImpl

          public IndexTableImpl()

  - ### Method Detail

    - #### getIndexSID

          @UInt32
          public int getIndexSID()

      Description copied from interface: `IndexTable`

      Returns the index stream identifier for this index table within its MXF file.

      Specified by:
        `getIndexSID` in interface `IndexTable`
      Returns:
        Index stream identifier for this index table.

    - #### clone

          public IndexTable clone()

      Description copied from interface: `IndexTable`

      Create a cloned copy of this index table.

      Specified by:
        `clone` in interface `IndexTable`
      Overrides:
        `clone` in class `Object`
      Returns:
        Cloned copy of this index table.

    - #### createFromBuffer

          public static final IndexTable createFromBuffer(ByteBuffer buffer)
                                                   throws NullPointerException,
                                                          BufferUnderflowException

      Throws:
        `NullPointerException`
        `BufferUnderflowException`

    - #### getPaddingFillSize

          public long getPaddingFillSize()

      Description copied from interface: `Padded`

      Returns the number of padding bytes following a significant entry in a partition, such as a partition pack or index table.

      Specified by:
        `getPaddingFillSize` in interface `Padded`
      Returns:
        Padding bytes following a significant entry in a partition.

    - #### setPaddingFillSize

          public void setPaddingFillSize(long paddingFillSize)
                                  throws IllegalArgumentException

      Description copied from interface: `Padded`

      Set the amount of padding to include after each significant entry in the partition, allowing space for the metadata to expand over time.

      Specified by:
        `setPaddingFillSize` in interface `Padded`
      Parameters:
        `paddingFillSize` - Size of padding to include after the partition.
      Throws:
        `IllegalArgumentException` - Cannot set the padding size to a negative value.
      See Also:
        `Partition.setPartitionPackPadding(long)`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### streamOffset

          public long streamOffset(@PositionType
                                   long position,
                                   int subStream)
                            throws IllegalArgumentException

      Description copied from interface: `IndexTable`

      Calculate the byte offset in the indexed stream of the frame at the given position.

      Specified by:
        `streamOffset` in interface `IndexTable`
      Parameters:
        `position` - Edit unit number counted from the start of body.
        `subStream` - Sub-stream number to calculate the offset for.
      Returns:
      Throws:
        `IllegalArgumentException`

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.