public class ModificationHandler extends Object implements AudioFileModificationListener
Constructor and Description |
---|
ModificationHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addAudioFileModificationListener(AudioFileModificationListener l)
This method adds an
AudioFileModificationListener |
void |
fileModified(AudioFile original,
File temporary)
(overridden)
|
void |
fileOperationFinished(File result)
(overridden)
|
void |
fileWillBeModified(AudioFile file,
boolean delete)
(overridden)
|
void |
removeAudioFileModificationListener(AudioFileModificationListener l)
This method removes an
AudioFileModificationListener |
void |
vetoThrown(AudioFileModificationListener cause,
AudioFile original,
ModifyVetoException veto)
(overridden)
|
public void addAudioFileModificationListener(AudioFileModificationListener l)
AudioFileModificationListener
l
- Listener to add.public void fileModified(AudioFile original, File temporary) throws ModifyVetoException
fileModified
in interface AudioFileModificationListener
original
- The original file on which the operation was started.temporary
- The modified copy. (It may be of zero size if the original was
modified)ModifyVetoException
- If the Results doesn't fit the expectations of the listener,
it can prevent the replacement of the original by temporary.AudioFileModificationListener.fileModified(org.jaudiotagger.audio.AudioFile,
File)
public void fileOperationFinished(File result)
fileOperationFinished
in interface AudioFileModificationListener
result
- The remaining file. It's not of 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.AudioFileModificationListener.fileOperationFinished(File)
public void fileWillBeModified(AudioFile file, boolean delete) throws ModifyVetoException
fileWillBeModified
in interface AudioFileModificationListener
file
- The file that will be modified.delete
- true
if the deletion of tag data will be
performed.ModifyVetoException
- Thrown if the listener wants to prevent the process.AudioFileModificationListener.fileWillBeModified(org.jaudiotagger.audio.AudioFile,
boolean)
public void removeAudioFileModificationListener(AudioFileModificationListener l)
AudioFileModificationListener
l
- Listener to remove.public void vetoThrown(AudioFileModificationListener cause, AudioFile original, ModifyVetoException veto)
vetoThrown
in interface AudioFileModificationListener
cause
- The instance which caused the veto.original
- The original file, that was about to be modified.veto
- The thrown exception.AudioFileModificationListener.vetoThrown(org.jaudiotagger.audio.generic.AudioFileModificationListener,
org.jaudiotagger.audio.AudioFile,
org.jaudiotagger.audio.exceptions.ModifyVetoException)
Copyright © 2005–2020 jthink.net. All rights reserved.