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 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.ID3TagsID3Tags.ID3Comment
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedID3v1Handler(byte[] tagData)Creates from the last 128 bytes of a stream.ID3v1Handler(InputStream stream, ContentHandler handler)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlbum()StringgetAlbumArtist()ID3v1 doesn't have album-wide artists, so returns null;StringgetArtist()The Artist for the trackList<ID3Tags.ID3Comment>getComments()Retrieves the comments, if any.StringgetCompilation()ID3v1 doesn't have compilations, so returns null;StringgetComposer()ID3v1 doesn't have composers, so returns null;StringgetDisc()ID3v1 doesn't have disc numbers, so returns null;StringgetGenre()booleangetTagsPresent()Does the file contain this kind of tags?StringgetTitle()StringgetTrackNumber()The number of the track within the album / recordingStringgetYear()
 
- 
- 
- 
Constructor Detail- 
ID3v1Handlerpublic ID3v1Handler(InputStream stream, ContentHandler handler) throws IOException, SAXException, TikaException - Throws:
- IOException
- SAXException
- TikaException
 
 - 
ID3v1Handlerprotected ID3v1Handler(byte[] tagData) throws IOException, SAXException, TikaExceptionCreates from the last 128 bytes of a stream.- Parameters:
- tagData- Must be the last 128 bytes
- Throws:
- IOException
- SAXException
- TikaException
 
 
- 
 - 
Method Detail- 
getTagsPresentpublic boolean getTagsPresent() Description copied from interface:ID3TagsDoes the file contain this kind of tags?- Specified by:
- getTagsPresentin interface- ID3Tags
 
 - 
getArtistpublic String getArtist() Description copied from interface:ID3TagsThe Artist for the track
 - 
getCommentspublic List<ID3Tags.ID3Comment> getComments() Description copied from interface:ID3TagsRetrieves the comments, if any. Files may have more than one comment, but normally only one with any language/description pair.- Specified by:
- getCommentsin interface- ID3Tags
 
 - 
getTrackNumberpublic String getTrackNumber() Description copied from interface:ID3TagsThe number of the track within the album / recording- Specified by:
- getTrackNumberin interface- ID3Tags
 
 - 
getComposerpublic String getComposer() ID3v1 doesn't have composers, so returns null;- Specified by:
- getComposerin interface- ID3Tags
 
 - 
getAlbumArtistpublic String getAlbumArtist() ID3v1 doesn't have album-wide artists, so returns null;- Specified by:
- getAlbumArtistin interface- ID3Tags
 
 - 
getDiscpublic String getDisc() ID3v1 doesn't have disc numbers, so returns null;
 - 
getCompilationpublic String getCompilation() ID3v1 doesn't have compilations, so returns null;- Specified by:
- getCompilationin interface- ID3Tags
 
 
- 
 
-