001    package helliker.id3;
002    /*
003       Copyright (C) 2001 Jonathan Hilliker
004       Copyright (C) 2007 Moritz Ringler
005       This library is free software; you can redistribute it and/or
006       modify it under the terms of the GNU Lesser General Public
007       License as published by the Free Software Foundation; either
008       version 2.1 of the License, or (at your option) any later version.
009       This library is distributed in the hope that it will be useful,
010       but WITHOUT ANY WARRANTY; without even the implied warranty of
011       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012       Lesser General Public License for more details.
013       You should have received a copy of the GNU Lesser General Public
014       License along with this library; if not, write to the Free Software
015       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
016      */
017    
018    import java.io.File;
019    
020    /**
021     * An exception to be thrown if the parser is unable to find an mpeg header.
022     */
023    public class NoMPEGFramesException extends ID3Exception {
024       private final File file;
025    
026      /**
027       * Create a NoMPEGFramesException with a default message.
028       */
029      public NoMPEGFramesException(File file) {
030        super(file + " is not a valid MPEG audio file.");
031        this.file = file;
032      }
033    
034    
035      /**
036       * Create a NoMPEGFramesException with a specified message.
037       *
038       *@param msg  the message for this exception
039       */
040      public NoMPEGFramesException(File file, String msg) {
041        super(msg);
042        this.file = file;
043      }
044    
045      public File getFile(){
046          return file;
047      }
048    
049    }
050