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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
read()
Reads a m3u Fileboolean
Reads a m3u Filevoid
setContent(String content)
void
setM3uFile(File m3uFile)
Sets the m3u file, and try to read itboolean
write()
Writes content into the m3u fileboolean
Writes 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:
true
if no errors,false
otherwise- Throws:
WrongFileException
- if the given file is not an m3u playlist
-
read
Reads a m3u File- Returns:
true
if no errors,false
otherwise- Throws:
WrongFileException
- if the given file is not an m3u playlist
-
write
public boolean write()Writes content into the m3u file- Returns:
true
if no errors,false
otherwise
-
write
Writes content into an m3u file- Parameters:
m3uFile
-- Returns:
true
if no errors,false
otherwise
-
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
-