Package org.apache.tika.parser.mp3
Class Mp3Parser
- java.lang.Object
-
- org.apache.tika.parser.AbstractParser
-
- org.apache.tika.parser.mp3.Mp3Parser
-
- All Implemented Interfaces:
Serializable,org.apache.tika.parser.Parser
public class Mp3Parser extends org.apache.tika.parser.AbstractParserTheMp3Parseris used to parse ID3 Version 1 Tag information from an MP3 file, if available.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMp3Parser.ID3TagsAndAudio
-
Constructor Summary
Constructors Constructor Description Mp3Parser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Mp3Parser.ID3TagsAndAudiogetAllTagHandlers(InputStream stream, ContentHandler handler)Scans the MP3 frames for ID3 tags, and creates ID3Tag Handlers for each supported set of tags.intgetMaxRecordSize()Set<org.apache.tika.mime.MediaType>getSupportedTypes(org.apache.tika.parser.ParseContext context)voidparse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)voidsetMaxRecordSize(int maxRecordSize)This statically sets the max record size inID3v2Frame
-
-
-
Method Detail
-
getAllTagHandlers
protected static Mp3Parser.ID3TagsAndAudio getAllTagHandlers(InputStream stream, ContentHandler handler) throws IOException, SAXException, org.apache.tika.exception.TikaException
Scans the MP3 frames for ID3 tags, and creates ID3Tag Handlers for each supported set of tags.- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
getSupportedTypes
public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
-
parse
public void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context) throws IOException, SAXException, org.apache.tika.exception.TikaException
- Throws:
IOExceptionSAXExceptionorg.apache.tika.exception.TikaException
-
setMaxRecordSize
@Field public void setMaxRecordSize(int maxRecordSize)
This statically sets the max record size inID3v2Frame- Parameters:
maxRecordSize-
-
getMaxRecordSize
public int getMaxRecordSize()
-
-