public class PlaylistParser
extends java.lang.Object
| Constructor and Description |
|---|
PlaylistParser(java.io.InputStream inputStream,
Format format,
Encoding encoding)
Equivalent to:
|
PlaylistParser(java.io.InputStream inputStream,
Format format,
Encoding encoding,
ParsingMode parsingMode) |
PlaylistParser(java.io.InputStream inputStream,
Format format,
Extension extension)
Equivalent to:
|
PlaylistParser(java.io.InputStream inputStream,
Format format,
Extension extension,
ParsingMode parsingMode) |
PlaylistParser(java.io.InputStream inputStream,
Format format,
java.lang.String filename)
Equivalent to:
|
PlaylistParser(java.io.InputStream inputStream,
Format format,
java.lang.String filename,
ParsingMode parsingMode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable() |
Playlist |
parse()
This will not close the InputStream.
|
public PlaylistParser(java.io.InputStream inputStream,
Format format,
java.lang.String filename)
new PlaylistParser(inputStream, format, filename, ParsingMode.STRICT);
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatfilename - the extension of this filename will be used to determine the encoding required of the playlistpublic PlaylistParser(java.io.InputStream inputStream,
Format format,
java.lang.String filename,
ParsingMode parsingMode)
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatfilename - the extension of this filename will be used to determine the encoding required of the playlistparsingMode - indicates how to handle unknown lines in the input streampublic PlaylistParser(java.io.InputStream inputStream,
Format format,
Extension extension)
new PlaylistParser(inputStream, format, extension, ParsingMode.STRICT);
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatextension - requires the playlist be encoded according to this extension {M3U : windows-1252, M3U8 : utf-8}public PlaylistParser(java.io.InputStream inputStream,
Format format,
Extension extension,
ParsingMode parsingMode)
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatextension - requires the playlist be encoded according to this extension {M3U : windows-1252, M3U8 : utf-8}parsingMode - indicates how to handle unknown lines in the input streampublic PlaylistParser(java.io.InputStream inputStream,
Format format,
Encoding encoding)
new PlaylistParser(inputStream, format, encoding, ParsingMode.STRICT);
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatencoding - required encoding for the playlistpublic PlaylistParser(java.io.InputStream inputStream,
Format format,
Encoding encoding,
ParsingMode parsingMode)
inputStream - an open input stream positioned at the beginning of the fileformat - requires the playlist to be this formatencoding - required encoding for the playlistparsingMode - indicates how to handle unknown lines in the input streampublic Playlist parse() throws java.io.IOException, ParseException, PlaylistException
java.io.IOException - if the InputStream throws an IOExceptionjava.io.EOFException - if there is no data to parseParseException - if there is a syntactic error in the playlistPlaylistException - if the data in the parsed playlist is invalidpublic boolean isAvailable()