Package org.apache.tika.parser.mp3
Class ID3v1Handler
java.lang.Object
org.apache.tika.parser.mp3.ID3v1Handler
- All Implemented Interfaces:
ID3Tags
This is used to parse ID3 Version 1 Tag information from an MP3 file,
if available.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tika.parser.mp3.ID3Tags
ID3Tags.ID3Comment
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ID3v1Handler
(byte[] tagData) Creates from the last 128 bytes of a stream.ID3v1Handler
(InputStream stream, ContentHandler handler) -
Method Summary
Modifier and TypeMethodDescriptiongetAlbum()
ID3v1 doesn't have album-wide artists, so returns null;The Artist for the trackRetrieves the comments, if any.ID3v1 doesn't have compilations, so returns null;ID3v1 doesn't have composers, so returns null;getDisc()
ID3v1 doesn't have disc numbers, so returns null;getGenre()
boolean
Does the file contain this kind of tags?getTitle()
The number of the track within the album / recordinggetYear()
-
Constructor Details
-
ID3v1Handler
public ID3v1Handler(InputStream stream, ContentHandler handler) throws IOException, SAXException, TikaException - Throws:
IOException
SAXException
TikaException
-
ID3v1Handler
Creates from the last 128 bytes of a stream.- Parameters:
tagData
- Must be the last 128 bytes- Throws:
IOException
SAXException
TikaException
-
-
Method Details
-
getTagsPresent
public boolean getTagsPresent()Description copied from interface:ID3Tags
Does the file contain this kind of tags?- Specified by:
getTagsPresent
in interfaceID3Tags
-
getTitle
-
getArtist
Description copied from interface:ID3Tags
The Artist for the track -
getAlbum
-
getYear
-
getComments
Description copied from interface:ID3Tags
Retrieves the comments, if any. Files may have more than one comment, but normally only one with any language/description pair.- Specified by:
getComments
in interfaceID3Tags
-
getGenre
-
getTrackNumber
Description copied from interface:ID3Tags
The number of the track within the album / recording- Specified by:
getTrackNumber
in interfaceID3Tags
-
getComposer
ID3v1 doesn't have composers, so returns null;- Specified by:
getComposer
in interfaceID3Tags
-
getAlbumArtist
ID3v1 doesn't have album-wide artists, so returns null;- Specified by:
getAlbumArtist
in interfaceID3Tags
-
getDisc
ID3v1 doesn't have disc numbers, so returns null; -
getCompilation
ID3v1 doesn't have compilations, so returns null;- Specified by:
getCompilation
in interfaceID3Tags
-