| Constructor and Description |
|---|
AbstractID3v2Tag() |
AbstractID3v2Tag(byte[] bytes) |
AbstractID3v2Tag(byte[] bytes,
boolean obseleteFormat) |
public static final String ID_IMAGE
public static final String ID_ENCODER
public static final String ID_URL
public static final String ID_ARTIST_URL
public static final String ID_COMMERCIAL_URL
public static final String ID_COPYRIGHT_URL
public static final String ID_AUDIOFILE_URL
public static final String ID_AUDIOSOURCE_URL
public static final String ID_RADIOSTATION_URL
public static final String ID_PAYMENT_URL
public static final String ID_PUBLISHER_URL
public static final String ID_COPYRIGHT
public static final String ID_ORIGINAL_ARTIST
public static final String ID_BPM
public static final String ID_COMPOSER
public static final String ID_PUBLISHER
public static final String ID_COMMENT
public static final String ID_TEXT_LYRICS
public static final String ID_GENRE
public static final String ID_YEAR
public static final String ID_DATE
public static final String ID_ALBUM
public static final String ID_TITLE
public static final String ID_KEY
public static final String ID_ARTIST
public static final String ID_ALBUM_ARTIST
public static final String ID_TRACK
public static final String ID_PART_OF_SET
public static final String ID_COMPILATION
public static final String ID_CHAPTER_TOC
public static final String ID_CHAPTER
public static final String ID_GROUPING
public static final String ID_RATING
public static final String ID_IMAGE_OBSELETE
public static final String ID_ENCODER_OBSELETE
public static final String ID_URL_OBSELETE
public static final String ID_COPYRIGHT_OBSELETE
public static final String ID_ORIGINAL_ARTIST_OBSELETE
public static final String ID_BPM_OBSELETE
public static final String ID_COMPOSER_OBSELETE
public static final String ID_PUBLISHER_OBSELETE
public static final String ID_COMMENT_OBSELETE
public static final String ID_GENRE_OBSELETE
public static final String ID_YEAR_OBSELETE
public static final String ID_DATE_OBSELETE
public static final String ID_ALBUM_OBSELETE
public static final String ID_TITLE_OBSELETE
public static final String ID_KEY_OBSELETE
public static final String ID_ARTIST_OBSELETE
public static final String ID_ALBUM_ARTIST_OBSELETE
public static final String ID_TRACK_OBSELETE
public static final String ID_PART_OF_SET_OBSELETE
public static final String ID_COMPILATION_OBSELETE
public static final String ID_GROUPING_OBSELETE
public static final byte PICTURETYPE_OTHER
public static final byte PICTURETYPE_32PXICON
public static final byte PICTURETYPE_OTHERICON
public static final byte PICTURETYPE_FRONTCOVER
public static final byte PICTURETYPE_BACKCOVER
public static final byte PICTURETYPE_LEAFLET
public static final byte PICTURETYPE_MEDIA
public static final byte PICTURETYPE_LEADARTIST
public static final byte PICTURETYPE_ARTIST
public static final byte PICTURETYPE_CONDUCTOR
public static final byte PICTURETYPE_BAND
public static final byte PICTURETYPE_COMPOSER
public static final byte PICTURETYPE_LYRICIST
public static final byte PICTURETYPE_RECORDINGLOCATION
public static final byte PICTURETYPE_DURING_RECORDING
public static final byte PICTURETYPE_DURING_PERFORMANCE
public static final byte PICTURETYPE_SCREEN_CAPTURE
public static final byte PICTURETYPE_ILLUSTRATION
public static final byte PICTURETYPE_BAND_LOGOTYPE
public static final byte PICTURETYPE_PUBLISHER_LOGOTYPE
protected static final String TAG
protected static final String FOOTER_TAG
protected static final int HEADER_LENGTH
protected static final int FOOTER_LENGTH
protected static final int MAJOR_VERSION_OFFSET
protected static final int MINOR_VERSION_OFFSET
protected static final int FLAGS_OFFSET
protected static final int DATA_LENGTH_OFFSET
protected static final int FOOTER_BIT
protected static final int EXPERIMENTAL_BIT
protected static final int EXTENDED_HEADER_BIT
protected static final int COMPRESSION_BIT
protected static final int UNSYNCHRONISATION_BIT
protected static final int PADDING_LENGTH
private static final String ITUNES_COMMENT_DESCRIPTION
protected boolean unsynchronisation
protected boolean extendedHeader
protected boolean experimental
protected boolean footer
protected boolean compression
protected boolean padding
protected String version
private int dataLength
private int extendedHeaderLength
private byte[] extendedHeaderData
private boolean obseleteFormat
private final Map<String,ID3v2FrameSet> frameSets
public AbstractID3v2Tag()
public AbstractID3v2Tag(byte[] bytes)
throws NoSuchTagException,
UnsupportedTagException,
InvalidDataException
public AbstractID3v2Tag(byte[] bytes,
boolean obseleteFormat)
throws NoSuchTagException,
UnsupportedTagException,
InvalidDataException
private void unpackTag(byte[] bytes)
throws NoSuchTagException,
UnsupportedTagException,
InvalidDataException
private int unpackHeader(byte[] bytes)
throws UnsupportedTagException,
InvalidDataException
protected abstract void unpackFlags(byte[] bytes)
private int unpackExtendedHeader(byte[] bytes,
int offset)
protected int unpackFrames(byte[] bytes,
int offset,
int framesLength)
protected void addFrame(ID3v2Frame frame, boolean replace)
protected ID3v2Frame createFrame(byte[] bytes, int currentOffset) throws InvalidDataException
InvalidDataExceptionprotected ID3v2Frame createFrame(String id, byte[] data)
private int unpackFooter(byte[] bytes,
int offset)
throws InvalidDataException
InvalidDataExceptionpublic byte[] toBytes()
throws NotSupportedException
toBytes in interface ID3v1NotSupportedExceptionpublic void packTag(byte[] bytes)
throws NotSupportedException
NotSupportedExceptionprivate int packHeader(byte[] bytes,
int offset)
protected abstract void packFlags(byte[] bytes,
int i)
private int packExtendedHeader(byte[] bytes,
int offset)
public int packFrames(byte[] bytes,
int offset)
throws NotSupportedException
NotSupportedExceptionprivate int packSpecifiedFrames(byte[] bytes,
int offset,
String onlyId,
String notId)
throws NotSupportedException
NotSupportedExceptionprivate int packFooter(byte[] bytes,
int offset)
private int calculateDataLength()
protected boolean useFrameUnsynchronisation()
public String getVersion()
getVersion in interface ID3v1protected void invalidateDataLength()
public int getDataLength()
getDataLength in interface ID3v2public Map<String,ID3v2FrameSet> getFrameSets()
getFrameSets in interface ID3v2public boolean getPadding()
getPadding in interface ID3v2public void setPadding(boolean padding)
setPadding in interface ID3v2public boolean hasUnsynchronisation()
hasUnsynchronisation in interface ID3v2public void setUnsynchronisation(boolean unsynchronisation)
setUnsynchronisation in interface ID3v2public boolean getObseleteFormat()
getObseleteFormat in interface ID3v2public String getPartOfSet()
getPartOfSet in interface ID3v2public void setPartOfSet(String partOfSet)
setPartOfSet in interface ID3v2public boolean isCompilation()
isCompilation in interface ID3v2public void setCompilation(boolean compilation)
setCompilation in interface ID3v2public String getGrouping()
getGrouping in interface ID3v2public void setGrouping(String grouping)
setGrouping in interface ID3v2public String getAlbumArtist()
getAlbumArtist in interface ID3v2public void setAlbumArtist(String albumArtist)
setAlbumArtist in interface ID3v2private int getGenre(String text)
public String getGenreDescription()
getGenreDescription in interface ID3v1public void setGenreDescription(String text) throws IllegalArgumentException
ID3v2setGenreDescription in interface ID3v2text - genre stringIllegalArgumentExceptionprotected int extractGenreNumber(String genreValue) throws NumberFormatException
NumberFormatExceptionprotected String extractGenreDescription(String genreValue) throws NumberFormatException
NumberFormatExceptionpublic String getComment()
getComment in interface ID3v1public void setComment(String comment)
setComment in interface ID3v1public String getItunesComment()
getItunesComment in interface ID3v2public void setItunesComment(String itunesComment)
setItunesComment in interface ID3v2protected ID3v2CommentFrameData extractLyricsFrameData(String id)
public String getComposer()
getComposer in interface ID3v2public void setComposer(String composer)
setComposer in interface ID3v2public String getPublisher()
getPublisher in interface ID3v2public void setPublisher(String publisher)
setPublisher in interface ID3v2public String getOriginalArtist()
getOriginalArtist in interface ID3v2public void setOriginalArtist(String originalArtist)
setOriginalArtist in interface ID3v2public String getCopyright()
getCopyright in interface ID3v2public void setCopyright(String copyright)
setCopyright in interface ID3v2public String getArtistUrl()
getArtistUrl in interface ID3v2public void setArtistUrl(String url)
setArtistUrl in interface ID3v2public String getCommercialUrl()
getCommercialUrl in interface ID3v2public void setCommercialUrl(String url)
setCommercialUrl in interface ID3v2public String getCopyrightUrl()
getCopyrightUrl in interface ID3v2public void setCopyrightUrl(String url)
setCopyrightUrl in interface ID3v2public String getAudiofileUrl()
getAudiofileUrl in interface ID3v2public void setAudiofileUrl(String url)
setAudiofileUrl in interface ID3v2public String getAudioSourceUrl()
getAudioSourceUrl in interface ID3v2public void setAudioSourceUrl(String url)
setAudioSourceUrl in interface ID3v2public String getRadiostationUrl()
getRadiostationUrl in interface ID3v2public void setRadiostationUrl(String url)
setRadiostationUrl in interface ID3v2public String getPaymentUrl()
getPaymentUrl in interface ID3v2public void setPaymentUrl(String url)
setPaymentUrl in interface ID3v2public String getPublisherUrl()
getPublisherUrl in interface ID3v2public void setPublisherUrl(String url)
setPublisherUrl in interface ID3v2public ArrayList<ID3v2ChapterFrameData> getChapters()
getChapters in interface ID3v2public void setChapters(ArrayList<ID3v2ChapterFrameData> chapters)
setChapters in interface ID3v2public ArrayList<ID3v2ChapterTOCFrameData> getChapterTOC()
getChapterTOC in interface ID3v2public void setChapterTOC(ArrayList<ID3v2ChapterTOCFrameData> toc)
setChapterTOC in interface ID3v2public String getEncoder()
getEncoder in interface ID3v2public void setEncoder(String encoder)
setEncoder in interface ID3v2public byte[] getAlbumImage()
getAlbumImage in interface ID3v2public void setAlbumImage(byte[] albumImage,
String mimeType)
setAlbumImage in interface ID3v2public void setAlbumImage(byte[] albumImage,
String mimeType,
byte imageType,
String imageDescription)
setAlbumImage in interface ID3v2public void clearAlbumImage()
clearAlbumImage in interface ID3v2public String getAlbumImageMimeType()
getAlbumImageMimeType in interface ID3v2public void clearFrameSet(String id)
clearFrameSet in interface ID3v2public int getWmpRating()
getWmpRating in interface ID3v2public void setWmpRating(int rating)
setWmpRating in interface ID3v2private ArrayList<ID3v2ChapterFrameData> extractChapterFrameData(String id)
private ArrayList<ID3v2ChapterTOCFrameData> extractChapterTOCFrameData(String id)
protected ID3v2TextFrameData extractTextFrameData(String id)
private ID3v2WWWFrameData extractWWWFrameData(String id)
private ID3v2UrlFrameData extractUrlFrameData(String id)
private ID3v2CommentFrameData extractCommentFrameData(String id, boolean itunes)
private ID3v2PictureFrameData createPictureFrameData(String id)
private ID3v2PopmFrameData extractPopmFrameData(String id)