AudioCollection

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.IAudioCollection

public class AudioCollection extends DomObject<Presentation> implements IAudioCollection

Represents a collection of embedded audio files.

Methods

MethodDescription
size()Returns a number of audio files in the collection.
get_Item(int index)Gets the element at the specified index.
addAudio(IAudio audio)Adds a copy of an audio file from an another presentation.
addAudio(InputStream stream)Creates and adds a audio to a presentation from stream.
addAudio(InputStream stream, int loadingStreamBehavior)Creates and adds a audio to a presentation from stream.
addAudio(byte[] audioData)Creates and adds a audio to a presentation from byte array.
copyTo(System.Array array, int index)Copies audios to specified array starting from specified index.
isSynchronized()Returns a value indicating whether access to the collection is synchronized (thread-safe).
getSyncRoot()Returns a synchronization root.
iterator()Returns an enumerator that iterates through the collection.
iteratorJava()Returns a java iterator for the entire collection.

size()

public final int size()

Returns a number of audio files in the collection. Read-only int.

Returns: int

get_Item(int index)

public final IAudio get_Item(int index)

Gets the element at the specified index. Read-only IAudio.

Parameters:

ParameterTypeDescription
indexint

Returns: IAudio

addAudio(IAudio audio)

public final IAudio addAudio(IAudio audio)

Adds a copy of an audio file from an another presentation.

Parameters:

ParameterTypeDescription
audioIAudioSource audio.

Returns: IAudio - Added audio.

addAudio(InputStream stream)

public final IAudio addAudio(InputStream stream)

Creates and adds a audio to a presentation from stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamStream to add audio from.

Returns: IAudio - Added audio.

addAudio(InputStream stream, int loadingStreamBehavior)

public final IAudio addAudio(InputStream stream, int loadingStreamBehavior)

Creates and adds a audio to a presentation from stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamStream to add video audio from.
loadingStreamBehaviorintThe behavior which will be applied to the stream.

Returns: IAudio - Added audio.

addAudio(byte[] audioData)

public final IAudio addAudio(byte[] audioData)

Creates and adds a audio to a presentation from byte array.

Parameters:

ParameterTypeDescription
audioDatabyte[]Audio bytes.

Returns: IAudio - Added audio.

copyTo(System.Array array, int index)

public final void copyTo(System.Array array, int index)

Copies audios to specified array starting from specified index.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayArray.
indexintIndex.

isSynchronized()

public final boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Returns: boolean

getSyncRoot()

public final Object getSyncRoot()

Returns a synchronization root. Read-only Object.

Returns: java.lang.Object

iterator()

public final System.Collections.Generic.IGenericEnumerator<IAudio> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IAudio> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IAudio> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IAudio> - An java.util.Iterator for the entire collection.