javax.sound.sampled.spi
Class AudioFileReader

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sound.sampled.spi.AudioFileReader

public abstract class AudioFileReader
extends Object sample code for java.lang.Object definition code for java.lang.Object

Provider for audio file reading services. Classes providing concrete implementations can parse the format information from one or more types of audio file, and can produce audio input streams from files of these types.

Since:
1.3

Constructor Summary
AudioFileReader sample code for javax.sound.sampled.spi.AudioFileReader.AudioFileReader() definition code for javax.sound.sampled.spi.AudioFileReader.AudioFileReader() ()
           
 
Method Summary
abstract  AudioFileFormat sample code for javax.sound.sampled.AudioFileFormat definition code for javax.sound.sampled.AudioFileFormat getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.File) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.File) (File sample code for java.io.File definition code for java.io.File  file)
          Obtains the audio file format of the File provided.
abstract  AudioFileFormat sample code for javax.sound.sampled.AudioFileFormat definition code for javax.sound.sampled.AudioFileFormat getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.InputStream) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.InputStream) (InputStream sample code for java.io.InputStream definition code for java.io.InputStream  stream)
          Obtains the audio file format of the input stream provided.
abstract  AudioFileFormat sample code for javax.sound.sampled.AudioFileFormat definition code for javax.sound.sampled.AudioFileFormat getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.net.URL) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.net.URL) (URL sample code for java.net.URL definition code for java.net.URL  url)
          Obtains the audio file format of the URL provided.
abstract  AudioInputStream sample code for javax.sound.sampled.AudioInputStream definition code for javax.sound.sampled.AudioInputStream getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.File) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.File) (File sample code for java.io.File definition code for java.io.File  file)
          Obtains an audio input stream from the File provided.
abstract  AudioInputStream sample code for javax.sound.sampled.AudioInputStream definition code for javax.sound.sampled.AudioInputStream getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.InputStream) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.InputStream) (InputStream sample code for java.io.InputStream definition code for java.io.InputStream  stream)
          Obtains an audio input stream from the input stream provided.
abstract  AudioInputStream sample code for javax.sound.sampled.AudioInputStream definition code for javax.sound.sampled.AudioInputStream getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.net.URL) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.net.URL) (URL sample code for java.net.URL definition code for java.net.URL  url)
          Obtains an audio input stream from the URL provided.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AudioFileReader sample code for javax.sound.sampled.spi.AudioFileReader() definition code for javax.sound.sampled.spi.AudioFileReader()

public AudioFileReader()
Method Detail

getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.InputStream) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.InputStream)

public abstract AudioFileFormat sample code for javax.sound.sampled.AudioFileFormat definition code for javax.sound.sampled.AudioFileFormat  getAudioFileFormat(InputStream sample code for java.io.InputStream definition code for java.io.InputStream  stream)
                                            throws UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException ,
                                                   IOException sample code for java.io.IOException definition code for java.io.IOException 
Obtains the audio file format of the input stream provided. The stream must point to valid audio file data. In general, audio file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.

Parameters:
stream - the input stream from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs
See Also:
InputStream.markSupported() sample code for java.io.InputStream.markSupported() definition code for java.io.InputStream.markSupported() , InputStream.mark(int) sample code for java.io.InputStream.mark(int) definition code for java.io.InputStream.mark(int)

getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.net.URL) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.net.URL)

public abstract AudioFileFormat sample code for javax.sound.sampled.AudioFileFormat definition code for javax.sound.sampled.AudioFileFormat  getAudioFileFormat(URL sample code for java.net.URL definition code for java.net.URL  url)
                                            throws UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException ,
                                                   IOException sample code for java.io.IOException definition code for java.io.IOException 
Obtains the audio file format of the URL provided. The URL must point to valid audio file data.

Parameters:
url - the URL from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs

getAudioFileFormat sample code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.File) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioFileFormat(java.io.File)

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

Parameters:
file - the File from which file format information should be extracted
Returns:
an AudioFileFormat object describing the audio file format
Throws:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs

getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.InputStream) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.InputStream)

public abstract AudioInputStream sample code for javax.sound.sampled.AudioInputStream definition code for javax.sound.sampled.AudioInputStream  getAudioInputStream(InputStream sample code for java.io.InputStream definition code for java.io.InputStream  stream)
                                              throws UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException ,
                                                     IOException sample code for java.io.IOException definition code for java.io.IOException 
Obtains an audio input stream from the input stream provided. The stream must point to valid audio file data. In general, audio file readers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.

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:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the stream does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs
See Also:
InputStream.markSupported() sample code for java.io.InputStream.markSupported() definition code for java.io.InputStream.markSupported() , InputStream.mark(int) sample code for java.io.InputStream.mark(int) definition code for java.io.InputStream.mark(int)

getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.net.URL) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.net.URL)

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

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:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the URL does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs

getAudioInputStream sample code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.File) definition code for javax.sound.sampled.spi.AudioFileReader.getAudioInputStream(java.io.File)

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

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:
UnsupportedAudioFileException sample code for javax.sound.sampled.UnsupportedAudioFileException definition code for javax.sound.sampled.UnsupportedAudioFileException - if the File does not point to valid audio file data recognized by the system
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O exception occurs