public abstract class FormatConversionProvider extends Object
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 and Description |
|---|
FormatConversionProvider()
|
| Modifier and Type | Method and Description |
|---|---|
abstract AudioInputStream |
getAudioInputStream(AudioFormat
Obtains an audio input stream with the specified encoding from the given audio input stream.
|
abstract AudioInputStream |
getAudioInputStream(AudioFormat
Obtains an audio input stream with the specified format from the given audio input stream.
|
abstract AudioFormat |
getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider.
|
abstract AudioFormat |
getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider.
|
abstract AudioFormat |
getTargetEncodings(AudioFormat
Obtains the set of target format encodings supported by the format converter given a particular source format.
|
abstract AudioFormat |
getTargetFormats(AudioFormat
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
Indicates whether the format converter supports conversion to a particular encoding from a particular format.
|
boolean |
isConversionSupported(AudioFormat
Indicates whether the format converter supports conversion to one particular format from another.
|
boolean |
isSourceEncodingSupported(AudioFormat
Indicates whether the format converter supports conversion from the specified source format encoding.
|
boolean |
isTargetEncodingSupported(AudioFormat
Indicates whether the format converter supports conversion to the specified target format encoding.
|
public abstract AudioFormat.Encoding [] getSourceEncodings()
public abstract AudioFormat.Encoding [] getTargetEncodings()
public boolean isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding)
sourceEncoding - the source format encoding for which support is queried
true if the encoding is supported, otherwise
false
public boolean isTargetEncodingSupported(AudioFormat.Encoding targetEncoding)
targetEncoding - the target format encoding for which support is queried
true if the encoding is supported, otherwise
false
public abstract AudioFormat.Encoding [] getTargetEncodings(AudioFormat sourceFormat)
sourceFormat - format of the incoming data
public boolean isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat)
targetEncoding - desired encoding of the outgoing data
sourceFormat - format of the incoming data
true if the conversion is supported, otherwise
false
public abstract AudioFormat[] getTargetFormats(AudioFormat .Encoding targetEncoding, AudioFormat sourceFormat)
targetEncoding - desired encoding of the stream after processing
sourceFormat - format of the incoming data
public boolean isConversionSupported(AudioFormattargetFormat, AudioFormat sourceFormat)
targetFormat - desired format of outgoing data
sourceFormat - format of the incoming data
true if the conversion is supported, otherwise
false
public abstract AudioInputStreamgetAudioInputStream(AudioFormat .Encoding targetEncoding, AudioInputStream sourceStream)
targetEncoding - desired encoding of the stream after processing
sourceStream - stream from which data to be processed should be read
IllegalArgumentException - if the format combination supplied is not supported.
public abstract AudioInputStreamgetAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream)
targetFormat - desired data format of the stream after processing
sourceStream - stream from which data to be processed should be read
IllegalArgumentException - if the format combination supplied is not supported.