|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Constructor Summary | |
FormatConversionProvider()
|
Method Summary | |
abstract AudioInputStream |
getAudioInputStream(AudioFormat.Encoding targetEncoding,
AudioInputStream sourceStream)
Obtains an audio input stream with the specified encoding from the given audio input stream. |
abstract AudioInputStream |
getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream)
Obtains an audio input stream with the specified format from the given audio input stream. |
abstract AudioFormat.Encoding[] |
getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider. |
abstract AudioFormat.Encoding[] |
getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider. |
abstract AudioFormat.Encoding[] |
getTargetEncodings(AudioFormat sourceFormat)
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.Encoding targetEncoding,
AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to a particular encoding from a particular format. |
boolean |
isConversionSupported(AudioFormat targetFormat,
AudioFormat sourceFormat)
Indicates whether the format converter supports conversion to one particular format from another. |
boolean |
isSourceEncodingSupported(AudioFormat.Encoding sourceEncoding)
Indicates whether the format converter supports conversion from the specified source format encoding. |
boolean |
isTargetEncodingSupported(AudioFormat.Encoding targetEncoding)
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 |
public FormatConversionProvider()
Method Detail |
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 queriedtrue
if the encoding is supported, otherwise false
public boolean isTargetEncodingSupported(AudioFormat.Encoding targetEncoding)
targetEncoding
- the target format encoding for which support is queriedtrue
if the encoding is supported, otherwise false
public abstract AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat)
public boolean isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat)
targetEncoding
- desired encoding of the outgoing datasourceFormat
- format of the incoming datatrue
if the conversion is supported, otherwise false
public abstract AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat)
public boolean isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat)
targetFormat
- desired format of outgoing datasourceFormat
- format of the incoming datatrue
if the conversion is supported, otherwise false
public abstract AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream)
targetEncoding
- desired encoding of the stream after processingsourceStream
- stream from which data to be processed should be readIllegalArgumentException
- if the format combination supplied is
not supported.public abstract AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream)
targetFormat
- desired data format of the stream after processingsourceStream
- stream from which data to be processed should be readIllegalArgumentException
- if the format combination supplied is
not supported.
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.