本文整理汇总了Java中org.jaudiotagger.tag.images.Artwork.setBinaryData方法的典型用法代码示例。如果您正苦于以下问题:Java Artwork.setBinaryData方法的具体用法?Java Artwork.setBinaryData怎么用?Java Artwork.setBinaryData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jaudiotagger.tag.images.Artwork
的用法示例。
在下文中一共展示了Artwork.setBinaryData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* @return
*/
public List<Artwork> getArtworkList()
{
final List<TagField> coverartList = getFields(FieldKey.COVER_ART);
final List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (final TagField next : coverartList)
{
final AsfTagCoverField coverArt = (AsfTagCoverField) next;
final Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(coverArt.getRawImageData());
artwork.setMimeType(coverArt.getMimeType());
artwork.setDescription(coverArt.getDescription());
artwork.setPictureType(coverArt.getPictureType());
artworkList.add(artwork);
}
return artworkList;
}
示例2: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<Artwork> getArtworkList()
{
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList)
{
FrameBodyPIC coverArt = (FrameBodyPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(ImageFormats.getMimeTypeForFormat(coverArt.getFormatType()));
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl())
{
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
}
else
{
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例3: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<Artwork> getArtworkList()
{
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList)
{
FrameBodyAPIC coverArt = (FrameBodyAPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(coverArt.getMimeType());
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl())
{
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
}
else
{
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例4: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList()
{
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList)
{
FrameBodyAPIC coverArt = (FrameBodyAPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(coverArt.getMimeType());
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl())
{
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
}
else
{
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例5: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* @return
*/
public List<Artwork> getArtworkList() {
final List<TagField> coverartList = getFields(FieldKey.COVER_ART);
final List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (final TagField next : coverartList) {
final AsfTagCoverField coverArt = (AsfTagCoverField) next;
final Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(coverArt.getRawImageData());
artwork.setMimeType(coverArt.getMimeType());
artwork.setDescription(coverArt.getDescription());
artwork.setPictureType(coverArt.getPictureType());
artworkList.add(artwork);
}
return artworkList;
}
示例6: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<Artwork> getArtworkList() {
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList) {
FrameBodyPIC coverArt = (FrameBodyPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(ImageFormats.getMimeTypeForFormat(coverArt.getFormatType()));
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl()) {
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
} else {
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例7: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public List<Artwork> getArtworkList() {
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList) {
FrameBodyAPIC coverArt = (FrameBodyAPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(coverArt.getMimeType());
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl()) {
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
} else {
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例8: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList) {
FrameBodyAPIC coverArt = (FrameBodyAPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(coverArt.getMimeType());
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl()) {
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
} else {
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例9: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<>(coverartList.size());
for (TagField next : coverartList) {
FrameBodyPIC coverArt = (FrameBodyPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(ImageFormats.getMimeTypeForFormat(coverArt.getFormatType()));
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl()) {
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
} else {
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例10: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
List<TagField> coverartList = getFields(FieldKey.COVER_ART);
List<Artwork> artworkList = new ArrayList<>(coverartList.size());
for (TagField next : coverartList) {
FrameBodyAPIC coverArt = (FrameBodyAPIC) ((AbstractID3v2Frame) next).getBody();
Artwork artwork = ArtworkFactory.getNew();
artwork.setMimeType(coverArt.getMimeType());
artwork.setPictureType(coverArt.getPictureType());
if (coverArt.isImageUrl()) {
artwork.setLinked(true);
artwork.setImageUrl(coverArt.getImageUrl());
} else {
artwork.setBinaryData(coverArt.getImageData());
}
artworkList.add(artwork);
}
return artworkList;
}
示例11: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList()
{
List<TagField> coverartList = get(Mp4FieldKey.ARTWORK);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for(TagField next:coverartList)
{
Mp4TagCoverField mp4CoverArt = (Mp4TagCoverField)next;
Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(mp4CoverArt.getData());
artwork.setMimeType(Mp4TagCoverField.getMimeTypeForImageType(mp4CoverArt.getFieldType()));
artworkList.add(artwork);
}
return artworkList;
}
示例12: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
List<TagField> coverartList = get(Mp4FieldKey.ARTWORK);
List<Artwork> artworkList = new ArrayList<Artwork>(coverartList.size());
for (TagField next : coverartList) {
Mp4TagCoverField mp4CoverArt = (Mp4TagCoverField) next;
Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(mp4CoverArt.getData());
artwork.setMimeType(Mp4TagCoverField.getMimeTypeForImageType(mp4CoverArt.getFieldType()));
artworkList.add(artwork);
}
return artworkList;
}
示例13: updateCoverArt
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
/**
* Updates cover art by removing or replacing
* the existent one
*/
private void updateCoverArt() {
ContentValues contentValues = new ContentValues();
try {
if(mOperationType == ADD_COVER){
boolean isSameCoverArt = mTrackDetailsActivityWeakReference.get().mCurrentCoverArt == mTrackDetailsActivityWeakReference.get().mNewCoverArt;
//Here we update the data in case there have had changes
if (!isSameCoverArt && mTrackDetailsActivityWeakReference.get().mNewCoverArt != null && mTrackDetailsActivityWeakReference.get().mNewCoverArtLength > 0) {
Artwork artwork = new AndroidArtwork();
artwork.setBinaryData(mTrackDetailsActivityWeakReference.get().mNewCoverArt);
mTrackDetailsActivityWeakReference.get().mTag.deleteArtworkField();
mTrackDetailsActivityWeakReference.get().mTag.setField(artwork);
contentValues.put(TrackContract.TrackData.STATUS, AudioItem.STATUS_TAGS_EDITED_BY_USER);
//Update status for item list
mTrackDetailsActivityWeakReference.get().mCurrentAudioItem.setStatus(AudioItem.STATUS_TAGS_EDITED_BY_USER);
//Then, is necessary update the data in our DB
//to hold the state of current song
mTrackDetailsActivityWeakReference.get().mDbHelper.updateData(mTrackDetailsActivityWeakReference.get().mCurrentItemId, contentValues);
Log.d("only_cover_art", "updated");
}
}
else if(mOperationType == REMOVE_COVER){
mTrackDetailsActivityWeakReference.get().mTag.deleteArtworkField();
}
//Apply changes to audio file
mTrackDetailsActivityWeakReference.get().mAudioTaggerFile.commit();
mTrackDetailsActivityWeakReference.get().mDataUpdated = true;
}
catch (CannotWriteException | TagException e){
Crashlytics.logException(e);
e.printStackTrace();
mTrackDetailsActivityWeakReference.get().mDataUpdated = false;
causeError = e.getMessage();
}
}
示例14: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
final List<TagField> coverartList = getFields(FieldKey.COVER_ART);
final List<Artwork> artworkList = new ArrayList<>(coverartList.size());
for (final TagField next : coverartList) {
final AsfTagCoverField coverArt = (AsfTagCoverField) next;
final Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(coverArt.getRawImageData());
artwork.setMimeType(coverArt.getMimeType());
artwork.setDescription(coverArt.getDescription());
artwork.setPictureType(coverArt.getPictureType());
artworkList.add(artwork);
}
return artworkList;
}
示例15: getArtworkList
import org.jaudiotagger.tag.images.Artwork; //导入方法依赖的package包/类
public List<Artwork> getArtworkList() {
List<TagField> coverartList = get(Mp4FieldKey.ARTWORK);
List<Artwork> artworkList = new ArrayList<>(coverartList.size());
for (TagField next : coverartList) {
Mp4TagCoverField mp4CoverArt = (Mp4TagCoverField) next;
Artwork artwork = ArtworkFactory.getNew();
artwork.setBinaryData(mp4CoverArt.getData());
artwork.setMimeType(Mp4TagCoverField.getMimeTypeForImageType(mp4CoverArt.getFieldType()));
artworkList.add(artwork);
}
return artworkList;
}