Class M3U
java.lang.Object
be.gaudry.model.file.renamer.music.M3U
M3U playlist file
- Since:
- 1.0 Mar 19, 2010
- Author:
- Steph GAUDRY
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanread()Reads a m3u FilebooleanReads a m3u FilevoidsetContent(String content)voidsetM3uFile(File m3uFile)Sets the m3u file, and try to read itbooleanwrite()Writes content into the m3u filebooleanWrites content into an m3u file
-
Field Details
-
M3U_ENCODING
- See Also:
- Constant Field Values
-
-
Constructor Details
-
M3U
public M3U()Builds an empty m3u object -
M3U
Builds a m3u object from a file
-
-
Method Details
-
read
Reads a m3u File- Parameters:
m3uFile- File to read- Returns:
trueif no errors,falseotherwise- Throws:
WrongFileException- if the given file is not an m3u playlist
-
read
Reads a m3u File- Returns:
trueif no errors,falseotherwise- Throws:
WrongFileException- if the given file is not an m3u playlist
-
write
public boolean write()Writes content into the m3u file- Returns:
trueif no errors,falseotherwise
-
write
Writes content into an m3u file- Parameters:
m3uFile-- Returns:
trueif no errors,falseotherwise
-
getContent
- Returns:
- the m3u file as text, may be null
-
setContent
- Parameters:
content- the content to set- Throws:
WrongFileException- if the given text is not an m3u playlist
-
getM3uFile
- Returns:
- the m3uFile
-
setM3uFile
Sets the m3u file, and try to read it- Parameters:
m3uFile- the m3uFile to set
-