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 java.lang.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(java.io.InputStream stream, org.xml.sax.ContentHandler handler)
           
AudioFrame(int h1, int h2, int h3, int h4, java.io.InputStream in)
           
 
Method Summary
 int getChannels()
          Get the number of channels (1=mono, 2=stereo)
 int getSampleRate()
          Get the sampling rate, in Hz
 java.lang.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(java.io.InputStream stream,
                  org.xml.sax.ContentHandler handler)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  TikaException
Throws:
java.io.IOException
org.xml.sax.SAXException
TikaException

AudioFrame

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

getVersion

public java.lang.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-2011 The Apache Software Foundation. All Rights Reserved.