本文整理汇总了Java中org.jaudiotagger.audio.AudioFile.commit方法的典型用法代码示例。如果您正苦于以下问题:Java AudioFile.commit方法的具体用法?Java AudioFile.commit怎么用?Java AudioFile.commit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jaudiotagger.audio.AudioFile
的用法示例。
在下文中一共展示了AudioFile.commit方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: commitAudio
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
private void commitAudio(Context context, AudioFile f, File file) {
try {
f.commit();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Intent mediaScanIntent = new Intent(
Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
Uri contentUri = Uri.fromFile(file);
mediaScanIntent.setData(contentUri);
context.sendBroadcast(mediaScanIntent);
} else {
context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Utils.getStoragePath(context))));
}
} catch (CannotWriteException e) {
e.printStackTrace();
}
}
示例2: delete
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
/**
* Delete the Id3v1 and ID3v2 tags from file
*
* @param af
* @throws CannotReadException
* @throws CannotWriteException
*/
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException
{
((MP3File)af).setID3v1Tag(null);
((MP3File)af).setID3v2Tag(null);
af.commit();
}
示例3: deleteTag
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
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();
}
示例4: writeFile
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void writeFile(AudioFile f) throws CannotWriteException
{
//Because audio file is an instanceof MP3File this directs it to save
f.commit();
}
示例5: deleteTag
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
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();
}
示例6: writeFile
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void writeFile(AudioFile f) throws CannotWriteException {
//Because audio file is an instanceof MP3File this directs it to save
f.commit();
}
示例7: writeFile
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public static void writeFile(AudioFile audio) throws CannotWriteException {
audio.commit();
}
示例8: delete
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException {
((MP3File) af).setID3v1Tag(null);
((MP3File) af).setID3v2Tag(null);
af.commit();
}
示例9: delete
import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
/**
* Delete the Id3v1 and ID3v2 tags from file
*
* @param af
* @throws CannotReadException
* @throws CannotWriteException
*/
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException {
((MP3File) af).setID3v1Tag(null);
((MP3File) af).setID3v2Tag(null);
af.commit();
}