File[] files = dir.listFiles(new AudioFileFilter());
/** * Get the tag or if the file doesn't have one at all, create a default tag and return * * @return */ public Tag getTagOrCreateDefault() { Tag tag = getTag(); if (tag == null) { return createDefaultTag(); } return tag; }
public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }
AudioFile f = AudioFileIO.read(wavFile); WavTag tag = (WavTag) f.getTag(); Object[] temp = {false, tag.getFirst(FieldKey.TITLE), tag.getFirst(FieldKey.ARTIST), f.getAudioHeader().getTrackLength() // In seconds };
/** * <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); }
/** * Get the tag or if the file doesn't have one at all, create a default tag and set it * as the tag of this file * * @return */ public Tag getTagOrCreateAndSetDefault() { Tag tag = getTagOrCreateDefault(); setTag(tag); return tag; }
/** * <p/> * Write the tag contained in the audioFile in the actual file on the disk. * </p> * * @param f The AudioFile to be written * @throws CannotWriteException If the file could not be written/accessed, the extension * wasn't recognized, or other IO error occurred. */ public static void write(AudioFile f) throws CannotWriteException { getDefaultAudioFileIO().writeFile(f); }
/** * This method returns the default instance for static use.<br> * * @return The default instance. */ public static AudioFileIO getDefaultAudioFileIO() { if (defaultInstance == null) { defaultInstance = new AudioFileIO(); } return defaultInstance; }
public class MyAudioFile implements Parcelable{ private File file; //other fields... public MyAudioFile(AudioFile audioFile){ this.file = audioFile.getFile(); //populate other fields } //parcelable stuff }
/** * <p>Delete any tags that exist in the fie , this is the same as calling the <code>AudioFileIO.delete(this)</code> method. * * @throws CannotWriteException If the file could not be written/accessed, the extension wasn't recognized, or other IO error occured. * @see AudioFileIO */ public void delete() throws CannotReadException, CannotWriteException { AudioFileIO.delete(this); }
/** * Get the tag or if the file doesn't have one at all, create a default tag and return * * @return */ public Tag getTagOrCreateDefault() { Tag tag = getTag(); if(tag==null) { return createDefaultTag(); } return tag; }
public void writeFile(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save f.commit(); }
/** * <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 the audioFile in the actual file on the disk. * </p> * * @param f The AudioFile to be written * @throws CannotWriteException If the file could not be written/accessed, the extension * wasn't recognized, or other IO error occurred. */ public static void write(AudioFile f) throws CannotWriteException { getDefaultAudioFileIO().writeFile(f); }
/** * This method returns the default instance for static use.<br> * * @return The default instance. */ public static AudioFileIO getDefaultAudioFileIO() { if (defaultInstance == null) { defaultInstance = new AudioFileIO(); } return defaultInstance; }
public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }
/** * <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); }
/** * This method returns the default instance for static use.<br> * * @return The default instance. */ public static AudioFileIO getDefaultAudioFileIO() { if (defaultInstance == null) { defaultInstance = new AudioFileIO(); } return defaultInstance; }
public void writeFile(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save f.commit(); }
public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }