This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.sound.sampled.spi
class FormatConversionProvider

java.lang.Object extended by javax.sound.sampled.spi.FormatConversionProvider

public abstract class FormatConversionProvider
extends Object

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.


Constructor Summary

          
 
Method Summary
abstract AudioInputStream
getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream)

          Obtains an audio input stream with the specified format from the given audio input stream.
abstract AudioInputStream

          Obtains an audio input stream with the specified encoding from the given audio input stream.
abstract AudioFormat.Encoding[]

          Obtains the set of source format encodings from which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[]

          Obtains the set of target format encodings to which format conversion services are provided by this provider.
abstract AudioFormat.Encoding[]

          Obtains the set of target format encodings supported by the format converter given a particular source format.
abstract AudioFormat[]
getTargetFormats(AudioFormat.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.
 boolean
isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat)

          Indicates whether the format converter supports conversion to one particular format from another.
 boolean

          Indicates whether the format converter supports conversion to a particular encoding from a particular format.
 boolean

          Indicates whether the format converter supports conversion from the specified source format encoding.
 boolean

          Indicates whether the format converter supports conversion to the specified target format encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatConversionProvider

public FormatConversionProvider()
Method Detail

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(AudioFormat targetFormat,
                                                     AudioInputStream sourceStream)
Obtains an audio input stream with the specified format from the given audio input stream.

Parameters:
targetFormat - desired data format of the stream after processing
sourceStream - stream from which data to be processed should be read
Returns:
stream from which processed data with the specified format may be read

getAudioInputStream

public abstract AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding,
                                                     AudioInputStream sourceStream)
Obtains an audio input stream with the specified encoding from the given audio input stream.

Parameters:
targetEncoding - desired encoding of the stream after processing
sourceStream - stream from which data to be processed should be read
Returns:
stream from which processed data with the specified target encoding may be read

getSourceEncodings

public abstract AudioFormat.Encoding[] getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider.

Returns:
array of source format encodings. The array will always have a length of at least 1.

getTargetEncodings

public abstract AudioFormat.Encoding[] getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider.

Returns:
array of target format encodings. The array will always have a length of at least 1.

getTargetEncodings

public abstract AudioFormat.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.

Parameters:
sourceFormat
Returns:
array of supported target format encodings.

getTargetFormats

public abstract AudioFormat[] getTargetFormats(AudioFormat.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.

Parameters:
targetEncoding
sourceFormat
Returns:
array of supported target formats.

isConversionSupported

public boolean isConversionSupported(AudioFormat targetFormat,
                                     AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to one particular format from another.

Parameters:
targetFormat - desired format of outgoing data
sourceFormat - format of the incoming data
Returns:
true if the conversion is supported, otherwise false

isConversionSupported

public boolean isConversionSupported(AudioFormat.Encoding targetEncoding,
                                     AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to a particular encoding from a particular format.

Parameters:
targetEncoding - desired encoding of the outgoing data
sourceFormat - format of the incoming data
Returns:
true if the conversion is supported, otherwise false

isSourceEncodingSupported

public boolean isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding)
Indicates whether the format converter supports conversion from the specified source format encoding.

Parameters:
sourceEncoding - the source format encoding for which support is queried
Returns:
true if the encoding is supported, otherwise false

isTargetEncodingSupported

public boolean isTargetEncodingSupported(AudioFormat.Encoding targetEncoding)
Indicates whether the format converter supports conversion to the specified target format encoding.

Parameters:
targetEncoding - the target format encoding for which support is queried
Returns:
true if the encoding is supported, otherwise false


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.