Package org.red5.io.matroska.parser
Class TagCrawler
- java.lang.Object
-
- org.red5.io.matroska.parser.TagCrawler
-
public class TagCrawler extends Object
class able to walk through the webm file and pass parsed tags to registered handlers
-
-
Constructor Summary
Constructors Constructor Description TagCrawler()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TagCrawleraddHandler(String name, TagHandler handler)Method to addTagHandlerTagHandlercreateSkipHandler()Method to create "default" handler (the one will be used if none other handlers were found) can be overridden to change the logicTagHandlergetHandler(Tag tag)Method to getTagHandlerby tag, can be overridden to change the logic of handler searchingvoidprocess(InputStream input)Method to process the input stream given, will stop as soon as input stream will be emptyTagCrawlerremoveHandler(String name)Method to removeTagHandler
-
-
-
Method Detail
-
addHandler
public TagCrawler addHandler(String name, TagHandler handler)
Method to addTagHandler- Parameters:
name- - unique name of tag handlerhandler- - handler- Returns:
- - this for chaining
-
removeHandler
public TagCrawler removeHandler(String name)
Method to removeTagHandler- Parameters:
name- - unique name of tag handler- Returns:
- - this for chaining
-
getHandler
public TagHandler getHandler(Tag tag)
Method to getTagHandlerby tag, can be overridden to change the logic of handler searching- Parameters:
tag- - tag to be handled- Returns:
- - this for chaining
-
createSkipHandler
public TagHandler createSkipHandler()
Method to create "default" handler (the one will be used if none other handlers were found) can be overridden to change the logic- Returns:
- - this for chaining
-
process
public void process(InputStream input) throws IOException, ConverterException
Method to process the input stream given, will stop as soon as input stream will be empty- Parameters:
input- - input stream to process- Throws:
IOException- - in case of any IO errorsConverterException- - in case of any conversion errorss
-
-