code
stringlengths
11
173k
docstring
stringlengths
2
593k
func_name
stringlengths
2
189
language
stringclasses
1 value
repo
stringclasses
844 values
path
stringlengths
11
294
url
stringlengths
60
339
license
stringclasses
4 values
public void addLyric(String text) { setLyric(getLyric() + text); }
Add additional lyric to the lyric field @param text
FrameBodyUSLT::addLyric
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/id3/framebody/FrameBodyUSLT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/id3/framebody/FrameBodyUSLT.java
Apache-2.0
public void addLyric(Lyrics3Line line) { setLyric(getLyric() + line.writeString()); }
@param line
FrameBodyUSLT::addLyric
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/id3/framebody/FrameBodyUSLT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/id3/framebody/FrameBodyUSLT.java
Apache-2.0
public boolean isExistingId3Tag() { return isExistingId3Tag; }
@return true if the file that this tag was written from already contains an ID3 chunk
AiffTag::isExistingId3Tag
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public AbstractID3v2Tag getID3Tag() { return id3Tag; }
Returns the ID3 tag
AiffTag::getID3Tag
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public void setID3Tag(AbstractID3v2Tag t) { id3Tag = t; }
Sets the ID3 tag
AiffTag::setID3Tag
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public long getSizeOfID3TagOnly() { if (!isExistingId3Tag()) { return 0; } return (id3Tag.getEndLocationInFile() - id3Tag.getStartLocationInFile()); }
@return size of the vanilla ID3Tag excluding surrounding chunk
AiffTag::getSizeOfID3TagOnly
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public long getSizeOfID3TagIncludingChunkHeader() { if (!isExistingId3Tag()) { return 0; } return getSizeOfID3TagOnly() + ChunkHeader.CHUNK_HEADER_SIZE; }
@return size of the ID3 Chunk including header
AiffTag::getSizeOfID3TagIncludingChunkHeader
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public long getStartLocationInFileOfId3Chunk() { if (!isExistingId3Tag()) { return 0; } return id3Tag.getStartLocationInFile() - ChunkHeader.CHUNK_HEADER_SIZE; }
Offset into file of start ID3Chunk including header @return
AiffTag::getStartLocationInFileOfId3Chunk
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public static AbstractID3v2Tag createDefaultID3Tag() { if(TagOptionSingleton.getInstance().getID3V2Version()== ID3V2Version.ID3_V24) { return new ID3v24Tag(); } else if(TagOptionSingleton.getInstance().getID3V2Version()==ID3V2Version.ID3_V23) { return new ID3v23Tag(); } else if(TagOptionSingleton.getInstance().getID3V2Version()==ID3V2Version.ID3_V22) { return new ID3v22Tag(); } //Default in case not set somehow return new ID3v23Tag(); }
Default based on user option @return
AiffTag::createDefaultID3Tag
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/aiff/AiffTag.java
Apache-2.0
public boolean setImageFromData() { throw new UnsupportedOperationException(); }
Should be called when you wish to prime the artwork for saving @return
AndroidArtwork::setImageFromData
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public void setFromFile(File file) throws IOException { RandomAccessFile imageFile = new RandomAccessFile(file, "r"); byte[] imagedata = new byte[(int) imageFile.length()]; imageFile.read(imagedata); imageFile.close(); setBinaryData(imagedata); setMimeType(ImageFormats.getMimeTypeForBinarySignature(imagedata)); setDescription(""); setPictureType(PictureTypes.DEFAULT_ID); }
Create Artwork from File @param file @throws java.io.IOException
AndroidArtwork::setFromFile
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public static AndroidArtwork createArtworkFromFile(File file) throws IOException { AndroidArtwork artwork = new AndroidArtwork(); artwork.setFromFile(file); return artwork; }
Create Artwork from File @param file @return @throws java.io.IOException
AndroidArtwork::createArtworkFromFile
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public static AndroidArtwork createLinkedArtworkFromURL(String url) throws IOException { AndroidArtwork artwork = new AndroidArtwork(); artwork.setLinkedFromURL(url); return artwork; }
@param url @return @throws IOException
AndroidArtwork::createLinkedArtworkFromURL
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public void setLinkedFromURL(String url) throws IOException { setLinked(true); setImageUrl(url); }
Create Linked Artwork from URL @param url @throws java.io.IOException
AndroidArtwork::setLinkedFromURL
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public void setFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) { setMimeType(coverArt.getMimeType()); setDescription(coverArt.getDescription()); setPictureType(coverArt.getPictureType()); if(coverArt.isImageUrl()) { setLinked(coverArt.isImageUrl()); setImageUrl(coverArt.getImageUrl()); } else { setBinaryData(coverArt.getImageData()); } setWidth(coverArt.getWidth()); setHeight(coverArt.getHeight()); }
Populate Artwork from MetadataBlockDataPicture as used by Flac and VorbisComment @param coverArt
AndroidArtwork::setFromMetadataBlockDataPicture
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public static AndroidArtwork createArtworkFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) { AndroidArtwork artwork = new AndroidArtwork(); artwork.setFromMetadataBlockDataPicture(coverArt); return artwork; }
Create artwork from Flac block @param coverArt @return
AndroidArtwork::createArtworkFromMetadataBlockDataPicture
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidArtwork.java
Apache-2.0
public void reduceQuality(Artwork artwork, int maxSize) throws IOException { throw new UnsupportedOperationException(); }
Resize the image until the total size require to store the image is less than maxsize @param artwork @param maxSize @throws IOException
AndroidImageHandler::reduceQuality
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public void makeSmaller(Artwork artwork,int size) throws IOException { throw new UnsupportedOperationException(); }
Resize image using Java 2D @param artwork @param size @throws java.io.IOException
AndroidImageHandler::makeSmaller
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public byte[] writeImage(Bitmap bi, String mimeType) throws IOException { throw new UnsupportedOperationException(); }
Write buffered image as required format @param bi @param mimeType @return @throws IOException
AndroidImageHandler::writeImage
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public byte[] writeImageAsPng(Bitmap bi) throws IOException { throw new UnsupportedOperationException(); }
@param bi @return @throws IOException
AndroidImageHandler::writeImageAsPng
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public void showReadFormats() { throw new UnsupportedOperationException(); }
Show read formats On Windows supports png/jpeg/bmp/gif
AndroidImageHandler::showReadFormats
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public void showWriteFormats() { throw new UnsupportedOperationException(); }
Show write formats On Windows supports png/jpeg/bmp
AndroidImageHandler::showWriteFormats
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/AndroidImageHandler.java
Apache-2.0
public boolean setImageFromData() { try { Bitmap image = getImage(); setWidth(image.getWidth()); setHeight(image.getHeight()); } catch(IOException ioe) { return false; } return true; }
Should be called when you wish to prime the artwork for saving @return
StandardArtwork::setImageFromData
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public void setFromFile(File file) throws IOException { RandomAccessFile imageFile = new RandomAccessFile(file, "r"); byte[] imagedata = new byte[(int) imageFile.length()]; imageFile.read(imagedata); imageFile.close(); setBinaryData(imagedata); setMimeType(ImageFormats.getMimeTypeForBinarySignature(imagedata)); setDescription(""); setPictureType(PictureTypes.DEFAULT_ID); }
Create Artwork from File @param file @throws java.io.IOException
StandardArtwork::setFromFile
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public void setLinkedFromURL(String url) throws IOException { setLinked(true); setImageUrl(url); }
Create Linked Artwork from URL @param url @throws java.io.IOException
StandardArtwork::setLinkedFromURL
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public static StandardArtwork createArtworkFromFile(File file) throws IOException { StandardArtwork artwork = new StandardArtwork(); artwork.setFromFile(file); return artwork; }
Create Artwork from File @param file @return @throws java.io.IOException
StandardArtwork::createArtworkFromFile
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public void setFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) { setMimeType(coverArt.getMimeType()); setDescription(coverArt.getDescription()); setPictureType(coverArt.getPictureType()); if(coverArt.isImageUrl()) { setLinked(coverArt.isImageUrl()); setImageUrl(coverArt.getImageUrl()); } else { setBinaryData(coverArt.getImageData()); } setWidth(coverArt.getWidth()); setHeight(coverArt.getHeight()); }
Populate Artwork from MetadataBlockDataPicture as used by Flac and VorbisComment @param coverArt
StandardArtwork::setFromMetadataBlockDataPicture
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public static StandardArtwork createArtworkFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) { StandardArtwork artwork = new StandardArtwork(); artwork.setFromMetadataBlockDataPicture(coverArt); return artwork; }
Create artwork from Flac block @param coverArt @return
StandardArtwork::createArtworkFromMetadataBlockDataPicture
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardArtwork.java
Apache-2.0
public void reduceQuality(Artwork artwork, int maxSize) throws IOException { while (artwork.getBinaryData().length > maxSize) { Bitmap srcImage = (Bitmap) artwork.getImage(); int w = srcImage.getWidth(); int newSize = w / 2; makeSmaller(artwork, newSize); } }
Resize the image until the total size require to store the image is less than maxsize @param artwork @param maxSize @throws IOException
StandardImageHandler::reduceQuality
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public void makeSmaller(Artwork artwork, int size) throws IOException { Bitmap srcImage = (Bitmap) artwork.getImage(); int w = srcImage.getWidth(); int h = srcImage.getHeight(); // Determine the scaling required to get desired result. float scaleW = (float) size / (float) w; float scaleH = (float) size / (float) h; //Create an image buffer in which to paint on, create as an opaque Rgb type image, it doesnt matter what type //the original image is we want to convert to the best type for displaying on screen regardless // Bitmap bi = new Bitmap(size, size, Bitmap.TYPE_INT_RGB); Bitmap bi = Bitmap.createScaledBitmap(srcImage, (int) scaleW, (int) scaleH, true); // // Set the scale. // AffineTransform tx = new AffineTransform(); // tx.scale(scaleW, scaleH); // // // Paint image. // Graphics2D g2d = bi.createGraphics(); // g2d.drawImage(srcImage, tx, null); // g2d.dispose(); if (artwork.getMimeType() != null && isMimeTypeWritable(artwork.getMimeType())) { artwork.setBinaryData(writeImage(bi, artwork.getMimeType())); } else { artwork.setBinaryData(writeImageAsPng(bi)); } }
Resize image using Java 2D @param artwork @param size @throws java.io.IOException
StandardImageHandler::makeSmaller
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public byte[] writeImage(Bitmap bi, String mimeType) throws IOException { Bitmap.CompressFormat format; switch (mimeType) { case "image/jpeg": case "image/jpg": format = Bitmap.CompressFormat.JPEG; break; case "image/png": format = Bitmap.CompressFormat.PNG; break; // case "image/webp": // format = Bitmap.CompressFormat.WEBP; // break; default: throw new IOException("Cannot write to this mimetype"); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(format, 100, baos); return baos.toByteArray(); }
Write buffered image as required format @param bi @param mimeType @return @throws IOException
StandardImageHandler::writeImage
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public byte[] writeImageAsPng(Bitmap bi) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.PNG, 100, baos); // ImageIO.write(bi, ImageFormats.MIME_TYPE_PNG, baos); return baos.toByteArray(); }
@param bi @return @throws IOException
StandardImageHandler::writeImageAsPng
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public void showReadFormats() { // String[] formats = ImageIO.getReaderMIMETypes(); // for (String f : formats) { // System.out.println("r" + f); // } }
Show read formats <p> On Windows supports png/jpeg/bmp/gif
StandardImageHandler::showReadFormats
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public void showWriteFormats() { // String[] formats = ImageIO.getWriterMIMETypes(); // for (String f : formats) { // System.out.println(f); // } }
Show write formats <p> On Windows supports png/jpeg/bmp
StandardImageHandler::showWriteFormats
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/StandardImageHandler.java
Apache-2.0
public static Artwork createArtworkFromMetadataBlockDataPicture(MetadataBlockDataPicture coverArt) { //Normal if(!TagOptionSingleton.getInstance().isAndroid()) { return StandardArtwork.createArtworkFromMetadataBlockDataPicture(coverArt); } //Android else { return AndroidArtwork.createArtworkFromMetadataBlockDataPicture(coverArt); } }
Create Artwork instance from A Flac Metadata Block @param coverArt @return
ArtworkFactory::createArtworkFromMetadataBlockDataPicture
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
Apache-2.0
public static Artwork createArtworkFromFile(File file) throws IOException { //Normal if(!TagOptionSingleton.getInstance().isAndroid()) { return StandardArtwork.createArtworkFromFile(file); } //Android else { return AndroidArtwork.createArtworkFromFile(file); } }
Create Artwork instance from an image file @param file @return @throws IOException
ArtworkFactory::createArtworkFromFile
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
Apache-2.0
public static Artwork createLinkedArtworkFromURL(String link) throws IOException { //Normal if(!TagOptionSingleton.getInstance().isAndroid()) { return StandardArtwork.createLinkedArtworkFromURL(link); } //Android else { return AndroidArtwork.createLinkedArtworkFromURL(link); } }
Create Artwork instance from an image file @param link @return @throws IOException
ArtworkFactory::createLinkedArtworkFromURL
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/images/ArtworkFactory.java
Apache-2.0
public List<MetadataBlockDataPicture> getImages() { return images; }
@return images
FlacTag::getImages
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public VorbisCommentTag getVorbisCommentTag() { return tag; }
@return the vorbis tag (this is what handles text metadata)
FlacTag::getVorbisCommentTag
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public List<String> getAll(FieldKey genericKey) throws KeyNotFoundException { if (genericKey==FieldKey.COVER_ART) { throw new UnsupportedOperationException(ErrorMessage.ARTWORK_CANNOT_BE_CREATED_WITH_THIS_METHOD.getMsg()); } else { return tag.getAll(genericKey); } }
Maps the generic key to the specific key and return the list of values for this field as strings @param genericKey @return @throws KeyNotFoundException
FlacTag::getAll
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public boolean isEmpty() { return (tag == null || tag.isEmpty()) && images.size() == 0; }
Determines whether the tag has no fields specified.<br> <p>If there are no images we return empty if either there is no VorbisTag or if there is a VorbisTag but it is empty @return <code>true</code> if tag contains no field.
FlacTag::isEmpty
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public void setField(String vorbisCommentKey, String value) throws KeyNotFoundException, FieldDataInvalidException { TagField tagfield = createField(vorbisCommentKey,value); setField(tagfield); }
Create and set field with name of vorbisCommentkey @param vorbisCommentKey @param value @throws KeyNotFoundException @throws FieldDataInvalidException
FlacTag::setField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public void addField(String vorbisCommentKey, String value) throws KeyNotFoundException, FieldDataInvalidException { TagField tagfield = createField(vorbisCommentKey,value); addField(tagfield); }
Create and add field with name of vorbisCommentkey @param vorbisCommentKey @param value @throws KeyNotFoundException @throws FieldDataInvalidException
FlacTag::addField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public void setField(TagField field) throws FieldDataInvalidException { if (field instanceof MetadataBlockDataPicture) { if (images.size() == 0) { images.add(0, (MetadataBlockDataPicture) field); } else { images.set(0, (MetadataBlockDataPicture) field); } } else { tag.setField(field); } }
@param field @throws FieldDataInvalidException
FlacTag::setField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public TagField createField(VorbisCommentFieldKey vorbisCommentFieldKey, String value) throws KeyNotFoundException,FieldDataInvalidException { if (vorbisCommentFieldKey.equals(VorbisCommentFieldKey.COVERART)) { throw new UnsupportedOperationException(ErrorMessage.ARTWORK_CANNOT_BE_CREATED_WITH_THIS_METHOD.getMsg()); } return tag.createField(vorbisCommentFieldKey,value); }
Create Tag Field using ogg key @param vorbisCommentFieldKey @param value @return @throws org.jaudiotagger.tag.KeyNotFoundException @throws org.jaudiotagger.tag.FieldDataInvalidException
FlacTag::createField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public TagField createField(String vorbisCommentFieldKey, String value) { if (vorbisCommentFieldKey.equals(VorbisCommentFieldKey.COVERART.getFieldName())) { throw new UnsupportedOperationException(ErrorMessage.ARTWORK_CANNOT_BE_CREATED_WITH_THIS_METHOD.getMsg()); } return tag.createField(vorbisCommentFieldKey,value); }
Create Tag Field using ogg key This method is provided to allow you to create key of any value because VorbisComment allows arbitary keys. @param vorbisCommentFieldKey @param value @return
FlacTag::createField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public void deleteField(FieldKey fieldKey) throws KeyNotFoundException { if (fieldKey.equals(FieldKey.COVER_ART)) { images.clear(); } else { tag.deleteField(fieldKey); } }
Delete any instance of tag fields with this key @param fieldKey
FlacTag::deleteField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public TagField createLinkedArtworkField(String url) { //Add to image list return new MetadataBlockDataPicture(url.getBytes(StandardCharsets.ISO_8859_1), PictureTypes.DEFAULT_ID, MetadataBlockDataPicture.IMAGE_IS_URL, "", 0, 0, 0, 0); }
Create Link to Image File, not recommended because if either flac or image file is moved link will be broken. @param url @return
FlacTag::createLinkedArtworkField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public TagField createField(Artwork artwork) throws FieldDataInvalidException { if(artwork.isLinked()) { return new MetadataBlockDataPicture( artwork.getImageUrl().getBytes(StandardCharsets.ISO_8859_1), artwork.getPictureType(), MetadataBlockDataPicture.IMAGE_IS_URL, "", 0, 0, 0, 0); } else { if(!artwork.setImageFromData()) { throw new FieldDataInvalidException("Unable to createField buffered image from the image"); } return new MetadataBlockDataPicture(artwork.getBinaryData(), artwork.getPictureType(), artwork.getMimeType(), artwork.getDescription(), artwork.getWidth(), artwork.getHeight(), 0, 0); } }
Create artwork field @return
FlacTag::createField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public void deleteArtworkField() throws KeyNotFoundException { this.deleteField(FieldKey.COVER_ART); }
Delete all instance of artwork Field @throws KeyNotFoundException
FlacTag::deleteArtworkField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public boolean hasField(FieldKey genericKey) { if (genericKey==FieldKey.COVER_ART) { return images.size() > 0; } else { return tag.hasField(genericKey); } }
@param genericKey @return
FlacTag::hasField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public boolean hasField(VorbisCommentFieldKey vorbisFieldKey) { return tag.hasField(vorbisFieldKey); }
@param vorbisFieldKey @return
FlacTag::hasField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/flac/FlacTag.java
Apache-2.0
public Lyrics3v2() { }
Creates a new Lyrics3v2 datatype.
Lyrics3v2::Lyrics3v2
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public Lyrics3v2(AbstractTag mp3tag) { if (mp3tag != null) { // upgrade the tag to lyrics3v2 if (mp3tag instanceof Lyrics3v2) { throw new UnsupportedOperationException("Copy Constructor not called. Please type cast the argument"); } else if (mp3tag instanceof Lyrics3v1 lyricOld) { Lyrics3v2Field newField; newField = new Lyrics3v2Field(new FieldFrameBodyLYR(lyricOld.getLyric())); fieldMap.put(newField.getIdentifier(), newField); } else { Lyrics3v2Field newField; Iterator<AbstractID3v2Frame> iterator; iterator = (new ID3v24Tag(mp3tag)).iterator(); while (iterator.hasNext()) { try { newField = new Lyrics3v2Field(iterator.next()); if (newField != null) { fieldMap.put(newField.getIdentifier(), newField); } } catch (TagException ex) { //invalid frame to createField lyrics3 field. ignore and keep going } } } } }
Creates a new Lyrics3v2 datatype. @param mp3tag @throws UnsupportedOperationException
Lyrics3v2::Lyrics3v2
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public Lyrics3v2(ByteBuffer byteBuffer) throws TagNotFoundException, IOException { try { this.read(byteBuffer); } catch (TagException e) { e.printStackTrace(); } }
Creates a new Lyrics3v2 datatype. @throws TagNotFoundException @throws IOException @param byteBuffer
Lyrics3v2::Lyrics3v2
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public void setField(Lyrics3v2Field field) { fieldMap.put(field.getIdentifier(), field); }
@param field
Lyrics3v2::setField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public Lyrics3v2Field getField(String identifier) { return fieldMap.get(identifier); }
Gets the value of the frame identified by identifier @param identifier The three letter code @return The value associated with the identifier
Lyrics3v2::getField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public int getFieldCount() { return fieldMap.size(); }
@return
Lyrics3v2::getFieldCount
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public String getIdentifier() { return "Lyrics3v2.00"; }
@return
Lyrics3v2::getIdentifier
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public int getSize() { int size = 0; Iterator<Lyrics3v2Field> iterator = fieldMap.values().iterator(); Lyrics3v2Field field; while (iterator.hasNext()) { field = iterator.next(); size += field.getSize(); } // include LYRICSBEGIN, but not 6 char size or LYRICSEND return 11 + size; }
@return
Lyrics3v2::getSize
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public boolean equals(Object obj) { if (!(obj instanceof Lyrics3v2 object)) { return false; } return this.fieldMap.equals(object.fieldMap) && super.equals(obj); }
@param obj @return
Lyrics3v2::equals
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public boolean hasField(String identifier) { return fieldMap.containsKey(identifier); }
@param identifier @return
Lyrics3v2::hasField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public Iterator<Lyrics3v2Field> iterator() { return fieldMap.values().iterator(); }
@return
Lyrics3v2::iterator
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public boolean seek(ByteBuffer byteBuffer) { return false; }
TODO implement @param byteBuffer @return @throws IOException
Lyrics3v2::seek
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public void removeField(String identifier) { fieldMap.remove(identifier); }
@param identifier
Lyrics3v2::removeField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public boolean seek(RandomAccessFile file) throws IOException { byte[] buffer = new byte[11]; String lyricEnd; String lyricStart; long filePointer; long lyricSize; // check right before the ID3 1.0 tag for the lyrics tag file.seek(file.length() - 128 - 9); file.read(buffer, 0, 9); lyricEnd = new String(buffer, 0, 9); if (lyricEnd.equals("LYRICS200")) { filePointer = file.getFilePointer(); } else { // check the end of the file for a lyrics tag incase an ID3 // tag wasn't placed after it. file.seek(file.length() - 9); file.read(buffer, 0, 9); lyricEnd = new String(buffer, 0, 9); if (lyricEnd.equals("LYRICS200")) { filePointer = file.getFilePointer(); } else { return false; } } // read the 6 bytes for the length of the tag filePointer -= (9 + 6); file.seek(filePointer); file.read(buffer, 0, 6); lyricSize = Integer.parseInt(new String(buffer, 0, 6)); // read the lyrics begin tag if it exists. file.seek(filePointer - lyricSize); file.read(buffer, 0, 11); lyricStart = new String(buffer, 0, 11); return lyricStart.equals("LYRICSBEGIN"); }
@param file @return @throws IOException
Lyrics3v2::seek
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public String toString() { Iterator<Lyrics3v2Field> iterator = fieldMap.values().iterator(); Lyrics3v2Field field; String str = getIdentifier() + " " + this.getSize() + "\n"; while (iterator.hasNext()) { field = iterator.next(); str += (field.toString() + "\n"); } return str; }
@return
Lyrics3v2::toString
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public void updateField(String identifier) { Lyrics3v2Field lyrField; if (identifier.equals("IND")) { boolean lyricsPresent = fieldMap.containsKey("LYR"); boolean timeStampPresent = false; if (lyricsPresent) { lyrField = fieldMap.get("LYR"); FieldFrameBodyLYR lyrBody = (FieldFrameBodyLYR) lyrField.getBody(); timeStampPresent = lyrBody.hasTimeStamp(); } lyrField = new Lyrics3v2Field(new FieldFrameBodyIND(lyricsPresent, timeStampPresent)); setField(lyrField); } }
@param identifier
Lyrics3v2::updateField
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public void write(RandomAccessFile file) throws IOException { int offset = 0; long size; long filePointer; byte[] buffer = new byte[6 + 9]; String str; Lyrics3v2Field field; Iterator<Lyrics3v2Field> iterator; ID3v1Tag id3v1tag; new ID3v1Tag(); id3v1tag = null; delete(file); file.seek(file.length()); filePointer = file.getFilePointer(); str = "LYRICSBEGIN"; for (int i = 0; i < str.length(); i++) { buffer[i] = (byte) str.charAt(i); } file.write(buffer, 0, str.length()); // IND needs to go first. lets createField/update it and write it first. updateField("IND"); field = fieldMap.get("IND"); field.write(file); iterator = fieldMap.values().iterator(); while (iterator.hasNext()) { field = iterator.next(); String id = field.getIdentifier(); boolean save = TagOptionSingleton.getInstance().getLyrics3SaveField(id); if ((!id.equals("IND")) && save) { field.write(file); } } size = file.getFilePointer() - filePointer; if (this.getSize() != size) { //logger.config("Lyrics3v2 size didn't match up while writing."); //logger.config("this.getsize() = " + this.getSize()); //logger.config("size (filePointer) = " + size); } str = Long.toString(size); for (int i = 0; i < (6 - str.length()); i++) { buffer[i] = (byte) '0'; } offset += (6 - str.length()); for (int i = 0; i < str.length(); i++) { buffer[i + offset] = (byte) str.charAt(i); } offset += str.length(); str = "LYRICS200"; for (int i = 0; i < str.length(); i++) { buffer[i + offset] = (byte) str.charAt(i); } offset += str.length(); file.write(buffer, 0, offset); if (id3v1tag != null) { id3v1tag.write(file); } }
@param file @throws IOException
Lyrics3v2::write
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
private int seekSize(ByteBuffer byteBuffer) { /* byte[] buffer = new byte[11]; String lyricEnd = ""; long filePointer = 0; // check right before the ID3 1.0 tag for the lyrics tag file.seek(file.length() - 128 - 9); file.read(buffer, 0, 9); lyricEnd = new String(buffer, 0, 9); if (lyricEnd.equals("LYRICS200")) { filePointer = file.getFilePointer(); } else { // check the end of the file for a lyrics tag incase an ID3 // tag wasn't placed after it. file.seek(file.length() - 9); file.read(buffer, 0, 9); lyricEnd = new String(buffer, 0, 9); if (lyricEnd.equals("LYRICS200")) { filePointer = file.getFilePointer(); } else { return -1; } } // read the 6 bytes for the length of the tag filePointer -= (9 + 6); file.seek(filePointer); file.read(buffer, 0, 6); return Integer.parseInt(new String(buffer, 0, 6)); */ return -1; }
TODO @param byteBuffer @return
Lyrics3v2::seekSize
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2.java
Apache-2.0
public Lyrics3v1() { }
Creates a new Lyrics3v1 datatype.
Lyrics3v1::Lyrics3v1
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public Lyrics3v1(ByteBuffer byteBuffer) throws TagNotFoundException, java.io.IOException { try { this.read(byteBuffer); } catch (TagException e) { e.printStackTrace(); } }
Creates a new Lyrics3v1 datatype. @throws TagNotFoundException @throws java.io.IOException @param byteBuffer
Lyrics3v1::Lyrics3v1
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public String getIdentifier() { return "Lyrics3v1.00"; }
@return
Lyrics3v1::getIdentifier
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public void setLyric(String lyric) { this.lyric = ID3Tags.truncate(lyric, 5100); }
@param lyric
Lyrics3v1::setLyric
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public String getLyric() { return lyric; }
@return
Lyrics3v1::getLyric
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public int getSize() { return "LYRICSBEGIN".length() + lyric.length() + "LYRICSEND".length(); }
@return
Lyrics3v1::getSize
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public boolean isSubsetOf(Object obj) { return (obj instanceof Lyrics3v1) && (((Lyrics3v1) obj).lyric.contains(this.lyric)); }
@param obj @return
Lyrics3v1::isSubsetOf
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public boolean equals(Object obj) { if (!(obj instanceof Lyrics3v1 object)) { return false; } return this.lyric.equals(object.lyric) && super.equals(obj); }
@param obj @return
Lyrics3v1::equals
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public Iterator iterator() { /** * @todo Implement this org.jaudiotagger.tag.AbstractMP3Tag abstract method */ throw new java.lang.UnsupportedOperationException("Method iterator() not yet implemented."); }
@return @throws java.lang.UnsupportedOperationException
Lyrics3v1::iterator
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public boolean seek(ByteBuffer byteBuffer) { return false; }
TODO implement @param byteBuffer @return @throws IOException
Lyrics3v1::seek
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public void read(ByteBuffer byteBuffer) throws TagException { byte[] buffer = new byte[5100 + 9 + 11]; String lyricBuffer; if (!seek(byteBuffer)) { throw new TagNotFoundException("ID3v1 tag not found"); } byteBuffer.get(buffer); lyricBuffer = new String(buffer); lyric = lyricBuffer.substring(0, lyricBuffer.indexOf("LYRICSEND")); }
@param byteBuffer @throws TagNotFoundException @throws IOException
Lyrics3v1::read
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public boolean seek(RandomAccessFile file) throws IOException { byte[] buffer = new byte[5100 + 9 + 11]; String lyricsEnd; String lyricsStart; long offset; // check right before the ID3 1.0 tag for the lyrics tag file.seek(file.length() - 128 - 9); file.read(buffer, 0, 9); lyricsEnd = new String(buffer, 0, 9); if (lyricsEnd.equals("LYRICSEND")) { offset = file.getFilePointer(); } else { // check the end of the file for a lyrics tag incase an ID3 // tag wasn't placed after it. file.seek(file.length() - 9); file.read(buffer, 0, 9); lyricsEnd = new String(buffer, 0, 9); if (lyricsEnd.equals("LYRICSEND")) { offset = file.getFilePointer(); } else { return false; } } // the tag can at most only be 5100 bytes offset -= (5100 + 9 + 11); file.seek(offset); file.read(buffer); lyricsStart = new String(buffer); // search for the tag int i = lyricsStart.indexOf("LYRICSBEGIN"); if (i == -1) { return false; } file.seek(offset + i + 11); return true; }
@param file @return @throws IOException
Lyrics3v1::seek
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public String toString() { String str = getIdentifier() + " " + this.getSize() + "\n"; return str + lyric; }
@return
Lyrics3v1::toString
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public void write(RandomAccessFile file) throws IOException { String str; int offset; byte[] buffer; ID3v1Tag id3v1tag; id3v1tag = null; delete(file); file.seek(file.length()); buffer = new byte[lyric.length() + 11 + 9]; str = "LYRICSBEGIN"; for (int i = 0; i < str.length(); i++) { buffer[i] = (byte) str.charAt(i); } offset = str.length(); str = ID3Tags.truncate(lyric, 5100); for (int i = 0; i < str.length(); i++) { buffer[i + offset] = (byte) str.charAt(i); } offset += str.length(); str = "LYRICSEND"; for (int i = 0; i < str.length(); i++) { buffer[i + offset] = (byte) str.charAt(i); } offset += str.length(); file.write(buffer, 0, offset); if (id3v1tag != null) { id3v1tag.write(file); } }
@param file @throws IOException
Lyrics3v1::write
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v1.java
Apache-2.0
public FieldFrameBodyUnsupported() { // this.value = new byte[0]; }
Creates a new FieldBodyUnsupported datatype.
FieldFrameBodyUnsupported::FieldFrameBodyUnsupported
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public FieldFrameBodyUnsupported(byte[] value) { this.value = value; }
Creates a new FieldBodyUnsupported datatype. @param value
FieldFrameBodyUnsupported::FieldFrameBodyUnsupported
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public FieldFrameBodyUnsupported(ByteBuffer byteBuffer) throws InvalidTagException { this.read(byteBuffer); }
Creates a new FieldBodyUnsupported datatype. @param byteBuffer @throws org.jaudiotagger.tag.InvalidTagException
FieldFrameBodyUnsupported::FieldFrameBodyUnsupported
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public String getIdentifier() { return "ZZZ"; }
@return
FieldFrameBodyUnsupported::getIdentifier
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public boolean isSubsetOf(Object obj) { if (!(obj instanceof FieldFrameBodyUnsupported object)) { return false; } String subset = new String(this.value); String superset = new String(object.value); return superset.contains(subset) && super.isSubsetOf(obj); }
@param obj @return
FieldFrameBodyUnsupported::isSubsetOf
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public boolean equals(Object obj) { if (!(obj instanceof FieldFrameBodyUnsupported object)) { return false; } return java.util.Arrays.equals(this.value, object.value) && super.equals(obj); }
@param obj @return
FieldFrameBodyUnsupported::equals
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public void read(ByteBuffer byteBuffer) throws InvalidTagException { int size; byte[] buffer = new byte[5]; // read the 5 character size byteBuffer.get(buffer, 0, 5); size = Integer.parseInt(new String(buffer, 0, 5)); value = new byte[size]; // read the SIZE length description byteBuffer.get(value); }
@param byteBuffer @throws IOException
FieldFrameBodyUnsupported::read
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public String toString() { return getIdentifier() + " : " + (new String(value)); }
@return
FieldFrameBodyUnsupported::toString
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public void write(RandomAccessFile file) throws IOException { int offset = 0; String str; byte[] buffer = new byte[5]; str = Integer.toString(value.length); for (int i = 0; i < (5 - str.length()); i++) { buffer[i] = (byte) '0'; } offset += (5 - str.length()); for (int i = 0; i < str.length(); i++) { buffer[i + offset] = (byte) str.charAt(i); } file.write(buffer); file.write(value); }
@param file @throws IOException
FieldFrameBodyUnsupported::write
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
protected void setupObjectList() { }
TODO
FieldFrameBodyUnsupported::setupObjectList
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyUnsupported.java
Apache-2.0
public static boolean isLyrics3v2FieldIdentifier(String identifier) { return identifier.length() >= 3 && getInstanceOf().getIdToValueMap().containsKey(identifier.substring(0, 3)); }
Returns true if the identifier is a valid Lyrics3v2 frame identifier @param identifier string to test @return true if the identifier is a valid Lyrics3v2 frame identifier
Lyrics3v2Fields::isLyrics3v2FieldIdentifier
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2Fields.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/Lyrics3v2Fields.java
Apache-2.0
public FieldFrameBodyAUT() { // this.setObject("Author", ""); }
Creates a new FieldBodyAUT datatype.
FieldFrameBodyAUT::FieldFrameBodyAUT
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
Apache-2.0
public FieldFrameBodyAUT(String author) { this.setObjectValue("Author", author); }
Creates a new FieldBodyAUT datatype. @param author
FieldFrameBodyAUT::FieldFrameBodyAUT
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
Apache-2.0
public FieldFrameBodyAUT(ByteBuffer byteBuffer) throws InvalidTagException { this.read(byteBuffer); }
Creates a new FieldBodyAUT datatype. @param byteBuffer @throws InvalidTagException
FieldFrameBodyAUT::FieldFrameBodyAUT
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
Apache-2.0
public void setAuthor(String author) { setObjectValue("Author", author); }
@param author
FieldFrameBodyAUT::setAuthor
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
Apache-2.0
public String getAuthor() { return (String) getObjectValue("Author"); }
@return
FieldFrameBodyAUT::getAuthor
java
ZTFtrue/MonsterMusic
app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
https://github.com/ZTFtrue/MonsterMusic/blob/master/app/src/main/java/org/jaudiotagger/tag/lyrics3/FieldFrameBodyAUT.java
Apache-2.0