public class

UlawCodec

extends FormatConversionProvider
java.lang.Object
   ↳ javax.sound.sampled.spi.FormatConversionProvider
     ↳ com.sun.media.sound.UlawCodec

Class Overview

U-law encodes linear data, and decodes u-law data to linear data.

Summary

Public Constructors
UlawCodec()
Constructs a new ULAW codec object.
Public Methods
AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream)
Obtains an audio input stream with the specified encoding from the given audio input stream.
AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream)
use old code...
Encoding[] getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider.
Encoding[] getTargetEncodings(AudioFormat sourceFormat)
Obtains the set of target format encodings supported by the format converter given a particular source format.
Encoding[] getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider.
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.
[Expand]
Inherited Methods
From class javax.sound.sampled.spi.FormatConversionProvider
From class java.lang.Object

Public Constructors

public UlawCodec ()

Constructs a new ULAW codec object.

Public Methods

public 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

public AudioInputStream getAudioInputStream (AudioFormat targetFormat, AudioInputStream sourceStream)

use old code...

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

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

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.

Returns
  • array of supported target format encodings.

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

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

Returns
  • array of supported target formats.