/** * <p>Write the tag contained in this AudioFile in the actual file on the disk, this is the same as calling the <code>AudioFileIO.write(this)</code> method. * * @throws NoWritePermissionsException if the file could not be written to due to file permissions * @throws CannotWriteException If the file could not be written/accessed, the extension wasn't recognized, or other IO error occured. * @see AudioFileIO */ public void commit() throws CannotWriteException { AudioFileIO.write(this); }
/** * <p>Write the tag contained in this AudioFile in the actual file on the disk, this is the same as calling the <code>AudioFileIO.write(this)</code> method.</p> * * @throws CannotWriteException If the file could not be written/accessed, the extension wasn't recognized, or other IO error occured. * @see AudioFileIO */ public void commit() throws CannotWriteException { AudioFileIO.write(this); }
/** * <p>Write the tag contained in this AudioFile in the actual file on the disk, this is the same as calling the <code>AudioFileIO.write(this)</code> method.</p> * * @throws CannotWriteException If the file could not be written/accessed, the extension wasn't recognized, or other IO error occured. * @see AudioFileIO */ public void commit() throws CannotWriteException { AudioFileIO.write(this); }
@Override public void write(Track track) throws TagWriteException { try { org.jaudiotagger.audio.AudioFile af1 = AudioFileIO.read(track.getTrackData().getFile()); Tag abstractTag = af1.getTagOrCreateDefault(); copyTagFields(abstractTag, new VorbisCommentTag(), track); AudioFileIO.write(af1); } catch (Exception e) { throw new TagWriteException(e); } }
@Override public void write(Track track) throws TagWriteException { try { org.jaudiotagger.audio.AudioFile af1 = AudioFileIO.read(track.getTrackData().getFile()); Tag abstractTag = af1.getTag(); copyTagFields(abstractTag, new Mp4Tag(), track); // workaround since track/tracktotal and disc/disctotal share same field handleTrackDiscFields(abstractTag, track); // workaround since genre and genre custom field types used handleGenreFields(abstractTag, track); AudioFileIO.write(af1); } catch (Exception e) { throw new TagWriteException(e); } }
AudioFileIO.write( f );