org.apache.tika.parser.mp3
Class AudioFrame

java.lang.Object
  extended by org.apache.tika.parser.mp3.AudioFrame
All Implemented Interfaces:
MP3Frame

public class AudioFrame
extends Object
implements MP3Frame

An Audio Frame in an MP3 file. These come after the ID3v2 tags in the file. Currently, only the header is processed, not the raw audio data.


Constructor Summary
AudioFrame(InputStream stream, ContentHandler handler)
           
AudioFrame(int h1, int h2, int h3, int h4, InputStream in)
           
 
Method Summary
 int getChannels()
          Get the number of channels (1=mono, 2=stereo)
 int getSampleRate()
          Get the sampling rate, in Hz
 String getVersion()
           
static boolean isAudioHeader(int h1, int h2, int h3, int h4)
          Does this appear to be a 4 byte audio frame header?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioFrame

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

AudioFrame

public AudioFrame(int h1,
                  int h2,
                  int h3,
                  int h4,
                  InputStream in)
           throws IOException
Throws:
IOException
Method Detail

getVersion

public String getVersion()

getSampleRate

public int getSampleRate()
Get the sampling rate, in Hz


getChannels

public int getChannels()
Get the number of channels (1=mono, 2=stereo)


isAudioHeader

public static boolean isAudioHeader(int h1,
                                    int h2,
                                    int h3,
                                    int h4)
Does this appear to be a 4 byte audio frame header?



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