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

tv.amwa.maj.io.file

## Class EssenceMultiAccess

- java.lang.Object
- - tv.amwa.maj.io.file.EssenceMultiAccess

- All Implemented Interfaces:
    Serializable, EssenceMultiAccess
  Direct Known Subclasses:
    EssenceAccess

      public class EssenceMultiAccess
      extends Object
      implements EssenceMultiAccess, Serializable

  TODO implementation, comments and tests

  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EssenceMultiAccess` | `castFromInterface(EssenceMultiAccess alien)` Cast a `EssenceMultiAccess` value from the generic interface to this implementation of the interface.
    `MultiResultItem[]` | `readMultiSamples(MultiXferItem[] xferArray)` Reads multiple channels of data from an interleaved data stream.
    `MultiResultItem[]` | `writeMultiSamples(MultiXferItem[] xferArray)` Writes multiple channels worth of sample data into the essence from an array of items representing interleaved data streams in the natural order for the codec.

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

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

- - ### Method Detail

    - #### castFromInterface

          public static final EssenceMultiAccess castFromInterface(EssenceMultiAccess alien)
                                                            throws NullPointerException

      Cast a `EssenceMultiAccess` value from the generic interface to this implementation of the interface. If the given value is not a native implementation, a copy will be instanciated using get and set methods.

      Parameters:
        `alien` - A potentially alien implementation of an instance of the EssenceMultiAccess interface.
      Returns:
        Instance of this class that is equal to the given value and that is an instance of this concrete implementation.
      Throws:
        `NullPointerException` - Argument is null.

    - #### readMultiSamples

          public MultiResultItem[] readMultiSamples(MultiXferItem[] xferArray)
                                             throws NullPointerException,
                                                    InvalidParameterException

      Description copied from interface: `EssenceMultiAccess`

      Reads multiple channels of data from an interleaved data stream. The given input array contains items that define which channel of data should be read. These items are modified by the operation by their data buffers being filled with data from the essence according to the parameters they specify. See `MultiXferItem` for more details.

      The array returned contains details of how many bytes and samples were transferred by the operation corresponding to each input item of the array given as a parameter. See `MultiResultItem` for more details.

      Specified by:
        `readMultiSamples` in interface `EssenceMultiAccess`
      Parameters:
        `xferArray` - Array of transfer items to read data into.
      Returns:
        An array containing the details of how many bytes and samples were transferred array by the operation for each item of the given array.
      Throws:
        `NullPointerException` - The given transfer array is `null` or one or more of its elements is `null`.
        `InvalidParameterException` - One or more of the parameters defined by an item of the given array is invalid.
      See Also:
        `EssenceMultiAccess.readMultiSamples(tv.amwa.maj.union.MultiXferItem[])`

    - #### writeMultiSamples

          public MultiResultItem[] writeMultiSamples(MultiXferItem[] xferArray)
                                              throws NullPointerException,
                                                     InvalidParameterException

      Description copied from interface: `EssenceMultiAccess`

      Writes multiple channels worth of sample data into the essence from an array of items representing interleaved data streams in the natural order for the codec. See `MultiXferItem` for details of the fields of each item.

      The array returned contains details of how many bytes and samples were transferred by the operation corresponding to each input item of the array given as a parameter. See `MultiResultItem` for more details.

      Specified by:
        `writeMultiSamples` in interface `EssenceMultiAccess`
      Parameters:
        `xferArray` - An array of transfer parameters. All fields of items in this array must be set up before performing the transfer.
      Returns:
        An array containing the details of how many bytes and samples were transferred for each item of the given array.
      Throws:
        `NullPointerException` - The given transfer array is `null` or one or more of its elements is `null`.
        `InvalidParameterException` - One or more of the parameters defined by an item of the given array is invalid.
      See Also:
        `EssenceMultiAccess.writeMultiSamples(tv.amwa.maj.union.MultiXferItem[])`

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