org.apache.tika.parser.mp3
Class ID3v1Handler

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface org.apache.tika.parser.mp3.ID3Tags
GENRES
 
Constructor Summary
protected ID3v1Handler(byte[] tagData)
          Creates from the last 128 bytes of a stream.
  ID3v1Handler(InputStream stream, ContentHandler handler)
           
 
Method Summary
 String getAlbum()
           
 String getArtist()
           
 String getComment()
           
 String getComposer()
          ID3v1 doesn't have composers, so returns null;
 String getGenre()
           
 boolean getTagsPresent()
          Does the file contain this kind of tags?
 String getTitle()
           
 String getTrackNumber()
           
 String getYear()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ID3v1Handler

public ID3v1Handler(InputStream stream,
                    ContentHandler handler)
             throws IOException,
                    SAXException,
                    TikaException
Throws:
IOException
SAXException
TikaException

ID3v1Handler

protected ID3v1Handler(byte[] tagData)
                throws IOException,
                       SAXException,
                       TikaException
Creates from the last 128 bytes of a stream.

Parameters:
tagData - Must be the last 128 bytes
Throws:
IOException
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 interface ID3Tags

getTitle

public String getTitle()
Specified by:
getTitle in interface ID3Tags

getArtist

public String getArtist()
Specified by:
getArtist in interface ID3Tags

getAlbum

public String getAlbum()
Specified by:
getAlbum in interface ID3Tags

getYear

public String getYear()
Specified by:
getYear in interface ID3Tags

getComment

public String getComment()
Specified by:
getComment in interface ID3Tags

getGenre

public String getGenre()
Specified by:
getGenre in interface ID3Tags

getTrackNumber

public String getTrackNumber()
Specified by:
getTrackNumber in interface ID3Tags

getComposer

public String getComposer()
ID3v1 doesn't have composers, so returns null;

Specified by:
getComposer in interface ID3Tags


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.