public final class CaptionsCollection extends java.lang.Object implements ICaptionsCollection
Represents a collection of the closed captions.
| Modifier and Type | Method and Description |
|---|---|
ICaptions |
add(java.lang.String label,
java.io.InputStream stream)
Adds WebVTT closed captions to the end of the collection from a stream.
|
ICaptions |
add(java.lang.String label,
java.lang.String filePath)
Adds WebVTT closed captions to the end of the collection.
|
void |
clear()
Removes all closed captions from the collection.
|
ICaptions |
get_Item(int index)
Returns the closed captions at the specified index.
|
int |
getCount()
Returns the number of elements in the collection.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<ICaptions> |
iterator()
Returns an enumerator that iterates through the collection.
|
void |
remove(ICaptions captions)
Removes the specified closed captions from the collection.
|
void |
removeAt(int index)
Removes the closed captions at the specified index.
|
public final ICaptions get_Item(int index)
Returns the closed captions at the specified index.
Read-only ICaptions.
get_Item in interface ICaptionsCollectionpublic final ICaptions add(java.lang.String label, java.lang.String filePath)
Adds WebVTT closed captions to the end of the collection.
add in interface ICaptionsCollectionlabel - The label of the closed captions.filePath - The path to the WebVTT file.ICaptions instance.com.aspose.ms.System.ArgumentNullException - Thrown if filePath is null.com.aspose.ms.System.ArgumentException - Thrown if filePath is empty.public final ICaptions add(java.lang.String label, java.io.InputStream stream)
Adds WebVTT closed captions to the end of the collection from a stream.
add in interface ICaptionsCollectionlabel - The label of the closed captions.stream - The input stream containing data in WebVTT format.ICaptions instance.com.aspose.ms.System.ArgumentNullException - Thrown if stream is null.com.aspose.ms.System.ArgumentException - Thrown if the input data is not in WebVTT format.public final void remove(ICaptions captions)
Removes the specified closed captions from the collection.
remove in interface ICaptionsCollectioncaptions - The closed captions to remove.public final void removeAt(int index)
Removes the closed captions at the specified index.
removeAt in interface ICaptionsCollectionindex - The index of the closed captions to remove.public final void clear()
Removes all closed captions from the collection.
clear in interface ICaptionsCollectionpublic final int getCount()
Returns the number of elements in the collection.
Read-only int.
getCount in interface ICaptionsCollectionpublic final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<ICaptions> iterator()
Returns an enumerator that iterates through the collection.
iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<ICaptions>iterator in interface com.aspose.ms.System.Collections.IEnumerable<ICaptions>iterator in interface java.lang.Iterable<ICaptions>System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.