Package org.apache.tika.parser.mp3
Class ID3v1Handler
- java.lang.Object
-
- org.apache.tika.parser.mp3.ID3v1Handler
-
- All Implemented Interfaces:
ID3Tags
public class ID3v1Handler extends java.lang.Object implements ID3Tags
This is used to parse ID3 Version 1 Tag information from an MP3 file, if available.- See Also:
- MP3 ID3 Version 1 specification
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tika.parser.mp3.ID3Tags
ID3Tags.ID3Comment
-
-
Constructor Summary
Constructors Constructor Description ID3v1Handler(java.io.InputStream stream, org.xml.sax.ContentHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlbum()
java.lang.String
getAlbumArtist()
ID3v1 doesn't have album-wide artists, so returns null;java.lang.String
getArtist()
The Artist for the trackjava.util.List<ID3Tags.ID3Comment>
getComments()
Retrieves the comments, if any.java.lang.String
getCompilation()
ID3v1 doesn't have compilations, so returns null;java.lang.String
getComposer()
ID3v1 doesn't have composers, so returns null;java.lang.String
getDisc()
ID3v1 doesn't have disc numbers, so returns null;java.lang.String
getGenre()
boolean
getTagsPresent()
Does the file contain this kind of tags?java.lang.String
getTitle()
java.lang.String
getTrackNumber()
The number of the track within the album / recordingjava.lang.String
getYear()
-
-
-
Constructor Detail
-
ID3v1Handler
public ID3v1Handler(java.io.InputStream stream, org.xml.sax.ContentHandler handler) throws java.io.IOException, org.xml.sax.SAXException, TikaException
- Throws:
java.io.IOException
org.xml.sax.SAXException
TikaException
-
-
Method Detail
-
getTagsPresent
public boolean getTagsPresent()
Description copied from interface:ID3Tags
Does the file contain this kind of tags?- Specified by:
getTagsPresent
in interfaceID3Tags
-
getArtist
public java.lang.String getArtist()
Description copied from interface:ID3Tags
The Artist for the track
-
getComments
public java.util.List<ID3Tags.ID3Comment> 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
-
getTrackNumber
public java.lang.String getTrackNumber()
Description copied from interface:ID3Tags
The number of the track within the album / recording- Specified by:
getTrackNumber
in interfaceID3Tags
-
getComposer
public java.lang.String getComposer()
ID3v1 doesn't have composers, so returns null;- Specified by:
getComposer
in interfaceID3Tags
-
getAlbumArtist
public java.lang.String getAlbumArtist()
ID3v1 doesn't have album-wide artists, so returns null;- Specified by:
getAlbumArtist
in interfaceID3Tags
-
getDisc
public java.lang.String getDisc()
ID3v1 doesn't have disc numbers, so returns null;
-
getCompilation
public java.lang.String getCompilation()
ID3v1 doesn't have compilations, so returns null;- Specified by:
getCompilation
in interfaceID3Tags
-
-