Package io.lindstrom.m3u8.parser
Class MasterPlaylistParser
java.lang.Object
io.lindstrom.m3u8.parser.AbstractPlaylistParser<MasterPlaylist,MasterPlaylist.Builder>
io.lindstrom.m3u8.parser.MasterPlaylistParser
public class MasterPlaylistParser extends AbstractPlaylistParser<MasterPlaylist,MasterPlaylist.Builder>
MasterPlaylistParser can read and write Master Playlists according to RFC 8216 (HTTP Live Streaming).
Example usage:
MasterPlaylistParser parser = new MasterPlaylistParser();
// Parse playlist
MasterPlaylist playlist = parser.readPlaylist(Paths.get("path/to/master.m3u8"));
// Update playlist version
MasterPlaylist updated = MasterPlaylist.builder()
.from(playlist)
.version(2)
.build();
// Write playlist to standard out
System.out.println(parser.writePlaylistAsString(updated));
This implementation is reusable and thread safe.-
Constructor Summary
Constructors Constructor Description MasterPlaylistParser()MasterPlaylistParser(ParsingMode parsingMode) -
Method Summary
Methods inherited from class io.lindstrom.m3u8.parser.AbstractPlaylistParser
readPlaylist, readPlaylist, readPlaylist, readPlaylist, readPlaylist, writePlaylistAsByteBuffer, writePlaylistAsBytes, writePlaylistAsStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MasterPlaylistParser
public MasterPlaylistParser() -
MasterPlaylistParser
-