org.kc7bfi.jflac.sound.spi
Class FlacAudioFileReader

java.lang.Object
  extended by javax.sound.sampled.spi.AudioFileReader
      extended by org.kc7bfi.jflac.sound.spi.FlacAudioFileReader

public class FlacAudioFileReader
extends javax.sound.sampled.spi.AudioFileReader

Provider for Flac audio file reading services. This implementation can parse the format information from Flac audio file, and can produce audio input streams from files of this type.


Constructor Summary
FlacAudioFileReader()
           
 
Method Summary
 javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.File file)
          Obtains the audio file format of the File provided.
 javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream stream)
          Obtains an audio input stream from the input stream provided.
 javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.net.URL url)
          Obtains an audio input stream from the URL provided.
 javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.File file)
          Obtains an audio input stream from the File provided.
 javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.InputStream stream)
          Obtains an audio input stream from the input stream provided.
 javax.sound.sampled.AudioInputStream getAudioInputStream(java.net.URL url)
          Obtains an audio input stream from the URL provided.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlacAudioFileReader

public FlacAudioFileReader()
Method Detail

getAudioFileFormat

public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.File file)
                                                       throws javax.sound.sampled.UnsupportedAudioFileException,
                                                              java.io.IOException
Obtains the audio file format of the File provided. The File must point to valid audio file data.

Specified by:
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReader
Parameters:
file - the File from which file format information should be extracted.
Returns:
an AudioFileFormat object describing the audio file format.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.

getAudioFileFormat

public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.net.URL url)
                                                       throws javax.sound.sampled.UnsupportedAudioFileException,
                                                              java.io.IOException
Obtains an audio input stream from the URL provided. The URL must point to valid audio file data.

Specified by:
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReader
Parameters:
url - the URL for which the AudioInputStream should be constructed.
Returns:
an AudioInputStream object based on the audio file data pointed to by the URL.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.

getAudioFileFormat

public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream stream)
                                                       throws javax.sound.sampled.UnsupportedAudioFileException,
                                                              java.io.IOException
Obtains an audio input stream from the input stream provided.

Specified by:
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReader
Parameters:
stream - the input stream from which the AudioInputStream should be constructed.
Returns:
an AudioInputStream object based on the audio file data contained in the input stream.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.

getAudioInputStream

public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.File file)
                                                         throws javax.sound.sampled.UnsupportedAudioFileException,
                                                                java.io.IOException
Obtains an audio input stream from the File provided. The File must point to valid audio file data.

Specified by:
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReader
Parameters:
file - the File for which the AudioInputStream should be constructed.
Returns:
an AudioInputStream object based on the audio file data pointed to by the File.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.

getAudioInputStream

public javax.sound.sampled.AudioInputStream getAudioInputStream(java.net.URL url)
                                                         throws javax.sound.sampled.UnsupportedAudioFileException,
                                                                java.io.IOException
Obtains an audio input stream from the URL provided. The URL must point to valid audio file data.

Specified by:
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReader
Parameters:
url - the URL for which the AudioInputStream should be constructed.
Returns:
an AudioInputStream object based on the audio file data pointed to by the URL.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.

getAudioInputStream

public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.InputStream stream)
                                                         throws javax.sound.sampled.UnsupportedAudioFileException,
                                                                java.io.IOException
Obtains an audio input stream from the input stream provided. The stream must point to valid audio file data.

Specified by:
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReader
Parameters:
stream - the input stream from which the AudioInputStream should be constructed.
Returns:
an AudioInputStream object based on the audio file data contained in the input stream.
Throws:
javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to a valid audio file data recognized by the system.
java.io.IOException - if an I/O exception occurs.