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.AbstractParser
The
Mp3Parser is used to parse ID3 Version 1 Tag information
from an MP3 file, if available.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static Mp3Parser.ID3TagsAndAudiogetAllTagHandlers(InputStream stream, ContentHandler handler) Scans the MP3 frames for ID3 tags, and creates ID3Tag Handlers for each supported set of tags.intSet<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 inID3v2FrameMethods inherited from class org.apache.tika.parser.AbstractParser
parse
-
Constructor Details
-
Mp3Parser
public Mp3Parser()
-
-
Method Details
-
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()
-