throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException checkFileExists(f);
/** * <p/> * Read the tag contained in the given file. * </p> * * @param f The file to read. * @return The AudioFile with the file tag and the file encoding info. * @throws CannotReadException If the file could not be read, the extension wasn't * recognized, or an IO error occurred during the read. * @throws org.jaudiotagger.tag.TagException * @throws org.jaudiotagger.audio.exceptions.ReadOnlyFileException * @throws java.io.IOException * @throws org.jaudiotagger.audio.exceptions.InvalidAudioFrameException */ public AudioFile readFile(File f) throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException { checkFileExists(f); String ext = Utils.getExtension(f); AudioFileReader afr = readers.get(ext); if (afr == null) { throw new CannotReadException(ErrorMessage.NO_READER_FOR_THIS_FORMAT.getMsg(ext)); } return afr.read(f); }
/** * <p/> * Read the tag contained in the given file. * </p> * * @param f The file to read. * @return The AudioFile with the file tag and the file encoding info. * @throws CannotReadException If the file could not be read, the extension wasn't * recognized, or an IO error occurred during the read. * @throws org.jaudiotagger.tag.TagException * * @throws org.jaudiotagger.audio.exceptions.ReadOnlyFileException * * @throws java.io.IOException * @throws org.jaudiotagger.audio.exceptions.InvalidAudioFrameException * */ public AudioFile readFile(File f) throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException { checkFileExists(f); String ext = Utils.getExtension(f); AudioFileReader afr = readers.get(ext); if (afr == null) { throw new CannotReadException(ErrorMessage.NO_READER_FOR_THIS_FORMAT.getMsg(ext)); } return afr.read(f); }
/** * * Read the tag contained in the given file. * * * @param f The file to read. * @return The AudioFile with the file tag and the file encoding info. * @throws org.jaudiotagger.audio.exceptions.CannotReadException If the file could not be read, the extension wasn't * recognized, or an IO error occurred during the read. * @throws org.jaudiotagger.tag.TagException * @throws org.jaudiotagger.audio.exceptions.ReadOnlyFileException * @throws java.io.IOException * @throws org.jaudiotagger.audio.exceptions.InvalidAudioFrameException */ public AudioFile readFile(File f) throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException { checkFileExists(f); String ext = Utils.getExtension(f); AudioFileReader afr = readers.get(ext); if (afr == null) { throw new CannotReadException(ErrorMessage.NO_READER_FOR_THIS_FORMAT.getMsg(ext)); } AudioFile tempFile = afr.read(f); tempFile.setExt(ext); return tempFile; }
/** * * Read the tag contained in the given file. * * * @param f The file to read. * @return The AudioFile with the file tag and the file encoding info. * @throws org.jaudiotagger.audio.exceptions.CannotReadException If the file could not be read, the extension wasn't * recognized, or an IO error occurred during the read. * @throws org.jaudiotagger.tag.TagException * @throws org.jaudiotagger.audio.exceptions.ReadOnlyFileException * @throws java.io.IOException * @throws org.jaudiotagger.audio.exceptions.InvalidAudioFrameException */ public AudioFile readFileMagic(File f) throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException { checkFileExists(f); String ext = Utils.getMagicExtension(f); AudioFileReader afr = readers.get(ext); if (afr == null) { throw new CannotReadException(ErrorMessage.NO_READER_FOR_THIS_FORMAT.getMsg(ext)); } AudioFile tempFile = afr.read(f); tempFile.setExt(ext); return tempFile; }