|
Java example source code file (FormatConversionProvider.java)
The FormatConversionProvider.java Java example source code
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.sound.sampled.spi;
import java.io.InputStream;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
/**
* 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.
* <p>
* The source format represents the format of the incoming
* audio data, which will be converted.
* <p>
* 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 <code>getAudioInputStream methods.
*
* @author Kara Kytle
* @since 1.3
*/
public abstract class FormatConversionProvider {
// NEW METHODS
/**
* Obtains the set of source format encodings from which format
* conversion services are provided by this provider.
* @return array of source format encodings. If for some reason provider
* does not provide any conversion services, an array of length 0 is
* returned.
*/
public abstract AudioFormat.Encoding[] getSourceEncodings();
/**
* Obtains the set of target format encodings to which format
* conversion services are provided by this provider.
* @return array of target format encodings. If for some reason provider
* does not provide any conversion services, an array of length 0 is
* returned.
*/
public abstract AudioFormat.Encoding[] getTargetEncodings();
/**
* Indicates whether the format converter supports conversion from the
* specified source format encoding.
* @param sourceEncoding the source format encoding for which support is queried
* @return <code>true if the encoding is supported, otherwise
Other Java examples (source code examples)Here is a short list of links related to this Java FormatConversionProvider.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.