|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sound.sampled.AudioFileFormat
An instance of the AudioFileFormat
class describes
an audio file, including the file type, the file's length in bytes,
the length in sample frames of the audio data contained in the file,
and the format of the audio data.
The
class includes methods for determining the format
of an audio file, obtaining an audio input stream from an audio file, and
writing an audio file from an audio input stream.
AudioSystem
AudioInputStream
Nested Class Summary | |
static class |
AudioFileFormat.Type
An instance of the Type class represents one of the
standard types of audio file. |
Constructor Summary | |
|
AudioFileFormat(AudioFileFormat.Type type,
AudioFormat format,
int frameLength)
Constructs an audio file format object. |
protected |
AudioFileFormat(AudioFileFormat.Type type,
int byteLength,
AudioFormat format,
int frameLength)
Constructs an audio file format object. |
Method Summary | |
int |
getByteLength()
Obtains the size in bytes of the entire audio file (not just its audio data). |
AudioFormat |
getFormat()
Obtains the format of the audio data contained in the audio file. |
int |
getFrameLength()
Obtains the length of the audio data contained in the file, expressed in sample frames. |
AudioFileFormat.Type |
getType()
Obtains the audio file type, such as WAVE or AU . |
String |
toString()
Provides a string representation of the file format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected AudioFileFormat(AudioFileFormat.Type type, int byteLength, AudioFormat format, int frameLength)
type
- the type of the audio filebyteLength
- the length of the file in bytes, or AudioSystem.NOT_SPECIFIED
format
- the format of the audio data contained in the fileframeLength
- the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
getType()
public AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength)
type
- the type of the audio fileformat
- the format of the audio data contained in the fileframeLength
- the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
Method Detail |
public AudioFileFormat.Type getType()
WAVE
or AU
.
AudioFileFormat.Type.WAVE
,
AudioFileFormat.Type.AU
,
AudioFileFormat.Type.AIFF
,
AudioFileFormat.Type.AIFC
,
AudioFileFormat.Type.SND
public int getByteLength()
AudioSystem.NOT_SPECIFIED
public AudioFormat getFormat()
public int getFrameLength()
AudioSystem.NOT_SPECIFIED
public String toString()
toString
in class Object
|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.