java.lang.Object | ||
↳ | javax.sound.sampled.spi.AudioFileReader | |
↳ | com.sun.media.sound.AiffFileReader |
AIFF file reader and writer.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | bisBufferSize |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
types | AIFF parser type |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new AiffParser object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Obtains the audio file format of the input stream provided.
| |||||||||||
Obtains the audio file format of the URL provided.
| |||||||||||
Obtains the audio file format of the File provided.
| |||||||||||
Obtains an audio stream from the input stream provided.
| |||||||||||
Obtains an audio stream from the File provided.
| |||||||||||
Obtains an audio stream from the URL provided.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
big2little
Protected helper method to swap the order of bytes in a 32 bit int
| |||||||||||
big2little
Protected helper method to swap the order of bytes in a 16 bit short
| |||||||||||
Calculates the frame size for PCM frames.
| |||||||||||
rllong
Protected helper method to read 64 bits and changing the order of
each bytes.
| |||||||||||
rlshort
Protected helper method to read 16 bits value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a new AiffParser object.
Obtains the audio file format of the input stream provided. The stream must point to valid audio file data. In general, audio file providers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
stream | the input stream from which file format information should be extracted |
---|
AudioFileFormat
object describing the audio file formatUnsupportedAudioFileException | if the stream does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
Obtains the audio file format of the URL provided. The URL must point to valid audio file data.
url | the URL from which file format information should be extracted |
---|
AudioFileFormat
object describing the audio file formatUnsupportedAudioFileException | if the URL does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
Obtains the audio file format of the File provided. The File must point to valid audio file data.
file | the File from which file format information should be extracted |
---|
AudioFileFormat
object describing the audio file formatUnsupportedAudioFileException | if the File does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
Obtains an audio stream from the input stream provided. The stream must point to valid audio file data. In general, audio file providers may need to read some data from the stream before determining whether they support it. These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.
stream | the input stream from which the AudioInputStream should be
constructed |
---|
AudioInputStream
object based on the audio file data contained
in the input stream.UnsupportedAudioFileException | if the stream does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
Obtains an audio stream from the File provided. The File must point to valid audio file data.
file | the File for which the AudioInputStream should be
constructed |
---|
AudioInputStream
object based on the audio file data pointed
to by the FileUnsupportedAudioFileException | if the File does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
Obtains an audio stream from the URL provided. The URL must point to valid audio file data.
url | the URL for which the AudioInputStream should be
constructed |
---|
AudioInputStream
object based on the audio file data pointed
to by the URLUnsupportedAudioFileException | if the URL does not point to valid audio file data recognized by the system |
---|---|
IOException | if an I/O exception occurs |
big2little Protected helper method to swap the order of bytes in a 32 bit int
big2little Protected helper method to swap the order of bytes in a 16 bit short
Calculates the frame size for PCM frames. Note that this method is appropriate for non-packed samples. For instance, 12 bit, 2 channels will return 4 bytes, not 3.
sampleSizeInBits | the size of a single sample in bits |
---|---|
channels | the number of channels |
rllong Protected helper method to read 64 bits and changing the order of each bytes.
IOException |
---|
rlshort Protected helper method to read 16 bits value. Swap high with low byte.
IOException |
---|