FileDocCategorySizeDatePackage
AudioFileModificationListener.javaAPI DocJaudiotagger 2.0.44258Wed Mar 30 16:11:52 BST 2011org.jaudiotagger.audio.generic

AudioFileModificationListener

public interface AudioFileModificationListener
Classes implementing this interface will be notified on audio file's modifications.

It will be notified on several occasions:

  • An audio file is about to be modified {@link #fileWillBeModified(AudioFile,boolean)}
    Here one can modify the tag data because of global settings.
  • The write process has just finished. But if a copy was created the original has not been replaced yet. ({@link #fileModified(AudioFile,File)}).
  • The operation has been finished. {@link #fileOperationFinished(File)}
author
Christian Laireiter

Fields Summary
Constructors Summary
Methods Summary
public voidfileModified(org.jaudiotagger.audio.AudioFile original, java.io.File temporary)
Notifies that original has been processed.
Because the audiolibrary allows format implementors to either change the original file or create a copy, it is possible that the real result is located in the original and temporary is of zero size or the original will be deleted and replaced by temporary.

param
original The original file on which the operation was started.
param
temporary The modified copy. (It may be of zero size if the original was modified)
throws
ModifyVetoException If the Results doesn't fit the expectations of the listener, it can prevent the replacement of the original by temporary.
If the original is already modified, this exception results in nothing.

public voidfileOperationFinished(java.io.File result)
Informs the listener that the process has been finished.
The given file is either the original file or the modified copy.

param
result The remaining file. It's not of {@link AudioFile} since it may be possible that a new file was created. In that case the audiolibs would need to parse the file again, which leads to long and unnecessary operation time, if the tag data is not needed any more.

public voidfileWillBeModified(org.jaudiotagger.audio.AudioFile file, boolean delete)
Notifies that the file is about to be modified.

param
file The file that will be modified.
param
delete true if the deletion of tag data will be performed.
throws
ModifyVetoException Thrown if the listener wants to prevent the process.

public voidvetoThrown(org.jaudiotagger.audio.generic.AudioFileModificationListener cause, org.jaudiotagger.audio.AudioFile original, org.jaudiotagger.audio.exceptions.ModifyVetoException veto)
This method notifies about a veto exception that has been thrown by another listener.

param
cause The instance which caused the veto.
param
original The original file, that was about to be modified.
param
veto The thrown exception.