|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jinx.audio.AudioUtil
public class AudioUtil
AudioUtil contains static methods to obtain Buffer objects from various
sources.
API Stability: Alpha; this is subject to change at any time.
| Method Summary | |
|---|---|
static boolean |
isBigEndian()
|
static boolean |
isBigEndian(java.nio.ByteBuffer buffer)
|
static Buffer |
loadBuffer(javax.sound.sampled.AudioInputStream in)
Constructs a Buffer object using data from an AudioInputStream. |
static Buffer |
loadBuffer(java.io.File file)
Constructs a Buffer object using data from an audio file. |
static Buffer |
loadBuffer(java.net.URL url)
Constructs a Buffer object using data from an audio file at the given URL. |
static Buffer |
nextBuffer(javax.sound.sampled.AudioInputStream in,
int length)
Constructs a new Buffer object by attempting to read up to the specified number of bytes from the given stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isBigEndian()
public static Buffer loadBuffer(java.io.File file)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
file - the File to obtain audio data from.
java.io.IOException - if an I/O error of any kind occurs.
javax.sound.sampled.UnsupportedAudioFileException - if the file cannot be read because
the file type is unsupported.
public static Buffer loadBuffer(java.net.URL url)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
url - the URL to obtain audio data from.
java.io.IOException - if an I/O error of any kind occurs.
javax.sound.sampled.UnsupportedAudioFileException - if the file cannot be read because
the file type is unsupported.
public static Buffer nextBuffer(javax.sound.sampled.AudioInputStream in,
int length)
throws java.io.IOException
in - the AudioInputStream to obtain audio data from.length - the number of bytes to read from the stream.
java.io.IOException - if an I/O error of any kind occurs.public static boolean isBigEndian(java.nio.ByteBuffer buffer)
public static Buffer loadBuffer(javax.sound.sampled.AudioInputStream in)
throws java.io.IOException
in - the AudioInputStream to obtain audio data from.
java.io.IOException - if an I/O error of any kind occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||