本文整理汇总了Java中com.mpatric.mp3agic.NotSupportedException类的典型用法代码示例。如果您正苦于以下问题:Java NotSupportedException类的具体用法?Java NotSupportedException怎么用?Java NotSupportedException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotSupportedException类属于com.mpatric.mp3agic包,在下文中一共展示了NotSupportedException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: save
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
public void save(String newFilename) throws IOException, NotSupportedException {
/*if (file.compareTo(new File(newFilename)) == 0) {
throw new IllegalArgumentException("Save filename same as source filename");
}*/
RandomAccessFile saveFile = new RandomAccessFile(newFilename, "rw");
try {
if (hasId3v2Tag()) {
saveFile.write(id3v2Tag.toBytes());
}
saveMpegFrames(saveFile);
if (hasCustomTag()) {
saveFile.write(customTag);
}
if (hasId3v1Tag()) {
saveFile.write(id3v1Tag.toBytes());
}
} finally {
saveFile.close();
}
}
示例2: writeAudioFiles
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
/**
* writes the given audio file to the harddisk
*
* @param indices
* given audio file
* @param pb
* the progressbar which will be updated for each changed audio
* file
*
* @throws NotSupportedException
* thrown if ID3Tag couldn't be generated
* @throws IOException
* thrown if new audio file couldn't be written
* @throws AudioFileException
* thrown if new audio file couldn't be reread
*/
public void writeAudioFiles(int[] indices, IProgressBar pb) throws NotSupportedException, IOException, AudioFileException {
for (int i = 0; i < indices.length; i++) {
if (this.stopFlag)
return;
logger.log(Level.FINER, "analyse audioFiles: " + indices[i] + " changed: " + audioFiles.get(indices[i]).hasChanged());
if (audioFiles.get(indices[i]).hasChanged()) {
if (!audioFiles.get(indices[i]).isWriteable())
throw new IOException("Couldn't write file: " + audioFiles.get(indices[i]).getFilePath());
audioFiles.get(indices[i]).save();
audioFiles.get(indices[i]).resetAudioFile();
pb.nextStep();
}
}
}
示例3: toBytes
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
@Override
public byte[] toBytes() throws NotSupportedException {
return this.tag.toBytes();
}
示例4: writeAudioFile
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
@Override
public void writeAudioFile(String filepath) throws NotSupportedException, IOException {
this.mp3.save(filepath);
}
示例5: retag
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
private void retag() throws IOException, NotSupportedException {
updateId3Tags();
updateCustomTag();
mp3file.save(mp3file.getFilename() + RETAG_EXTENSION);
renameFiles();
}
示例6: writeAudioFile
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
/**
* saves the modified audio file
*
* @param filepath
* path where to save the modified audio file
*
* @throws NotSupportedException
* thrown if an error occured while writing
* @throws IOException
* thrown if file couldn't be written
*/
public void writeAudioFile(String filepath) throws NotSupportedException, IOException;
示例7: save
import com.mpatric.mp3agic.NotSupportedException; //导入依赖的package包/类
/**
* saves all made changes to this audio files tag
*
* @throws NotSupportedException
* thrown if file couldn't be saved
*/
public void save() throws NotSupportedException, IOException;