CaptionsCollection

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.ICaptionsCollection

public final class CaptionsCollection implements ICaptionsCollection

Represents a collection of the closed captions.

Methods

MethodDescription
get_Item(int index)Returns the closed captions at the specified index.
add(String label, String filePath)Adds WebVTT closed captions to the end of the collection.
add(String label, InputStream stream)Adds WebVTT closed captions to the end of the collection from a stream.
remove(ICaptions captions)Removes the specified closed captions from the collection.
removeAt(int index)Removes the closed captions at the specified index.
clear()Removes all closed captions from the collection.
getCount()Returns the number of elements in the collection.
iterator()Returns an enumerator that iterates through the collection.

get_Item(int index)

public final ICaptions get_Item(int index)

Returns the closed captions at the specified index. Read-only ICaptions.

Parameters:

ParameterTypeDescription
indexint

Returns: ICaptions

add(String label, String filePath)

public final ICaptions add(String label, String filePath)

Adds WebVTT closed captions to the end of the collection.

Parameters:

ParameterTypeDescription
labeljava.lang.StringThe label of the closed captions.
filePathjava.lang.StringThe path to the WebVTT file.

Returns: ICaptions - The added ICaptions instance.

add(String label, InputStream stream)

public final ICaptions add(String label, InputStream stream)

Adds WebVTT closed captions to the end of the collection from a stream.

Parameters:

ParameterTypeDescription
labeljava.lang.StringThe label of the closed captions.
streamjava.io.InputStreamThe input stream containing data in WebVTT format.

Returns: ICaptions - The added ICaptions instance.

remove(ICaptions captions)

public final void remove(ICaptions captions)

Removes the specified closed captions from the collection.

Parameters:

ParameterTypeDescription
captionsICaptionsThe closed captions to remove.

removeAt(int index)

public final void removeAt(int index)

Removes the closed captions at the specified index.

Parameters:

ParameterTypeDescription
indexintThe index of the closed captions to remove.

clear()

public final void clear()

Removes all closed captions from the collection.

getCount()

public final int getCount()

Returns the number of elements in the collection. Read-only int .

Returns: int

iterator()

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

Returns an enumerator that iterates through the collection.

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