API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.sound.sampled. AudioSystem View Source
Author(s)
Kara Kytle
Florian Bomers
Matthias Pfisterer
Kevin P. Smith
Since
1.3
Version
1.83, 06/04/07
Serial
Hierarchy
 Object
      AudioSystem
Implements
Subclasses
Description
public class AudioSystem
  The AudioSystem class acts as the entry point to the sampled-audio system resources.
Constructors
private AudioSystem ()
Private no-args constructor for ensuring against instantiation.
Methods
Hide/Show inherited methods
publicstatic AudioFileFormat getAudioFileFormat (File file) throws UnsupportedAudioFileException IOException
  Obtains the audio file format of the specified File.
publicstatic AudioFileFormat getAudioFileFormat (InputStream stream) throws UnsupportedAudioFileException IOException
  Obtains the audio file format of the provided input stream.
publicstatic AudioFileFormat getAudioFileFormat (URL url) throws UnsupportedAudioFileException IOException
  Obtains the audio file format of the specified URL.
publicstatic Type getAudioFileTypes ()
  Obtains the file types for which file writing support is provided by the system.
publicstatic Type getAudioFileTypes (AudioInputStream stream)
  Obtains the file types that the system can write from the audio input stream specified.
publicstatic AudioInputStream getAudioInputStream (Encoding targetEncoding, AudioInputStream sourceStream)
  Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream.
publicstatic AudioInputStream getAudioInputStream (AudioFormat targetFormat, AudioInputStream sourceStream)
  Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
publicstatic AudioInputStream getAudioInputStream (File file) throws UnsupportedAudioFileException IOException
  Obtains an audio input stream from the provided File.
publicstatic AudioInputStream getAudioInputStream (InputStream stream) throws UnsupportedAudioFileException IOException
  Obtains an audio input stream from the provided input stream.
publicstatic AudioInputStream getAudioInputStream (URL url) throws UnsupportedAudioFileException IOException
  Obtains an audio input stream from the URL provided.
publicstatic Clip getClip () throws LineUnavailableException
  Obtains a clip that can be used for playing back an audio file or an audio stream.
publicstatic Clip getClip (Info mixerInfo) throws LineUnavailableException
  Obtains a clip from the specified mixer that can be used for playing back an audio file or an audio stream.
publicstatic Line getLine (Info info) throws LineUnavailableException
  Obtains a line that matches the description in the specified Line.Info object.
publicstatic Mixer getMixer (Info info)
  Obtains the requested audio mixer.
publicstatic Info getMixerInfo ()
  Obtains an array of mixer info objects that represents the set of audio mixers that are currently installed on the system.
publicstatic SourceDataLine getSourceDataLine (AudioFormat format) throws LineUnavailableException
  Obtains a source data line that can be used for playing back audio data in the format specified by the AudioFormat object.
publicstatic SourceDataLine getSourceDataLine (AudioFormat format, Info mixerinfo) throws LineUnavailableException
  Obtains a source data line that can be used for playing back audio data in the format specified by the AudioFormat object, provided by the mixer specified by the Mixer.Info object.
publicstatic Info getSourceLineInfo (Info info)
  Obtains information about all source lines of a particular type that are supported by the installed mixers.
publicstatic TargetDataLine getTargetDataLine (AudioFormat format) throws LineUnavailableException
  Obtains a target data line that can be used for recording audio data in the format specified by the AudioFormat object.
publicstatic TargetDataLine getTargetDataLine (AudioFormat format, Info mixerinfo) throws LineUnavailableException
  Obtains a target data line that can be used for recording audio data in the format specified by the AudioFormat object, provided by the mixer specified by the Mixer.Info object.
publicstatic Encoding getTargetEncodings (Encoding sourceEncoding)
  Obtains the encodings that the system can obtain from an audio input stream with the specified encoding using the set of installed format converters.
publicstatic Encoding getTargetEncodings (AudioFormat sourceFormat)
  Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
publicstatic AudioFormat getTargetFormats (Encoding targetEncoding, AudioFormat sourceFormat)
  Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
publicstatic Info getTargetLineInfo (Info info)
  Obtains information about all target lines of a particular type that are supported by the installed mixers.
publicstatic boolean isConversionSupported (Encoding targetEncoding, AudioFormat sourceFormat)
  Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
publicstatic boolean isConversionSupported (AudioFormat targetFormat, AudioFormat sourceFormat)
  Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
publicstatic boolean isFileTypeSupported (Type fileType)
  Indicates whether file writing support for the specified file type is provided by the system.
publicstatic boolean isFileTypeSupported (Type fileType, AudioInputStream stream)
  Indicates whether an audio file of the specified file type can be written from the indicated audio input stream.
publicstatic boolean isLineSupported (Info info)
  Indicates whether the system supports any lines that match the specified Line.Info object.
publicstatic int write (AudioInputStream stream, Type fileType, File out) throws IOException
  Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
publicstatic int write (AudioInputStream stream, Type fileType, OutputStream out) throws IOException
  Writes a stream of bytes representing an audio file of the specified file type to the output stream provided.
Fields
Hide/Show inherited fields
publicfinalstatic int NOT_SPECIFIED = "-1"
  An integer that stands for an unknown numeric value.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar