Home » openjdk-7 » javax.sound » sampled » spi » [javadoc | source]
javax.sound.sampled.spi
abstract public class: FormatConversionProvider [javadoc | source]
java.lang.Object
   javax.sound.sampled.spi.FormatConversionProvider
A format conversion provider provides format conversion services from one or more input formats to one or more output formats. Converters include codecs, which encode and/or decode audio data, as well as transcoders, etc. Format converters provide methods for determining what conversions are supported and for obtaining an audio stream from which converted data can be read.

The source format represents the format of the incoming audio data, which will be converted.

The target format represents the format of the processed, converted audio data. This is the format of the data that can be read from the stream returned by one of the getAudioInputStream methods.

Method from javax.sound.sampled.spi.FormatConversionProvider Summary:
getAudioInputStream,   getAudioInputStream,   getSourceEncodings,   getTargetEncodings,   getTargetEncodings,   getTargetFormats,   isConversionSupported,   isConversionSupported,   isSourceEncodingSupported,   isTargetEncodingSupported
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.sound.sampled.spi.FormatConversionProvider Detail:
 abstract public AudioInputStream getAudioInputStream(Encoding targetEncoding,
    AudioInputStream sourceStream)
    Obtains an audio input stream with the specified encoding from the given audio input stream.
 abstract public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
    AudioInputStream sourceStream)
    Obtains an audio input stream with the specified format from the given audio input stream.
 abstract public Encoding[] getSourceEncodings()
    Obtains the set of source format encodings from which format conversion services are provided by this provider.
 abstract public Encoding[] getTargetEncodings()
    Obtains the set of target format encodings to which format conversion services are provided by this provider.
 abstract public Encoding[] getTargetEncodings(AudioFormat sourceFormat)
    Obtains the set of target format encodings supported by the format converter given a particular source format. If no target format encodings are supported for this source format, an array of length 0 is returned.
 abstract public AudioFormat[] getTargetFormats(Encoding targetEncoding,
    AudioFormat sourceFormat)
    Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
 public boolean isConversionSupported(Encoding targetEncoding,
    AudioFormat sourceFormat) 
    Indicates whether the format converter supports conversion to a particular encoding from a particular format.
 public boolean isConversionSupported(AudioFormat targetFormat,
    AudioFormat sourceFormat) 
    Indicates whether the format converter supports conversion to one particular format from another.
 public boolean isSourceEncodingSupported(Encoding sourceEncoding) 
    Indicates whether the format converter supports conversion from the specified source format encoding.
 public boolean isTargetEncodingSupported(Encoding targetEncoding) 
    Indicates whether the format converter supports conversion to the specified target format encoding.