java.lang.Object
be.gaudry.model.file.renamer.music.M3U

public class M3U extends Object
M3U playlist file
Since:
1.0 Mar 19, 2010
Author:
Steph GAUDRY
  • Field Details

  • Constructor Details

    • M3U

      public M3U()
      Builds an empty m3u object
    • M3U

      public M3U(File m3uFile)
      Builds a m3u object from a file
  • Method Details

    • read

      public boolean read(File m3uFile) throws WrongFileException
      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

      public boolean read() throws WrongFileException
      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

      public boolean write(File m3uFile)
      Writes content into an m3u file
      Parameters:
      m3uFile -
      Returns:
      true if no errors, false otherwise
    • getContent

      public String getContent()
      Returns:
      the m3u file as text, may be null
    • setContent

      public void setContent(String content) throws WrongFileException
      Parameters:
      content - the content to set
      Throws:
      WrongFileException - if the given text is not an m3u playlist
    • getM3uFile

      public File getM3uFile()
      Returns:
      the m3uFile
    • setM3uFile

      public void setM3uFile(File m3uFile)
      Sets the m3u file, and try to read it
      Parameters:
      m3uFile - the m3uFile to set