Method Summary |
void |
beep()
This method sounds the audible alert on the console, which is typically a beep
sound. |
AudioClip |
createAudioClip(InputStream in)
Generates an audio clip from an input stream containing the data bytes for the
audio clip. |
AudioClip |
createAudioClip(String[] hexData)
Generates an audio clip from a string array that provides the pixel values. |
Image |
createImage(InputStream in)
Generates an image from an input stream containing the data bytes for the
image formatted in image/gif format. |
Image |
createImage(int[] pixels,
int width,
int height)
Generates an image from an array of pixel values. |
Image |
createImage(String[] hexData)
Generates an image from a string array that provides the pixel values. |
void |
defineAudioClip(String name,
AudioClip clip)
Inserts the given clip into the audio clip table under the specified name. |
void |
defineImage(String name,
Image image)
Inserts the given image into the image table under the specified name. |
void |
flushAudioClip(String name)
Removes the audio clip with the given name from the cache, allowing it
to be freed by the garbage collector. |
void |
flushImage(String name)
Removes the image with the given name from the cache, allowing it
to be freed by the garbage collector. |
InputStream |
getHexInputStream(String[] hexData)
Returns an input stream whose bytes come from the string array hex,
in which the elements consist of continuous bytes of hex data. |
Component |
getImageObserver()
This method returns a new lightweight component suitable as an imageObserver. |
boolean |
isCachingEnabled()
This method returns the status of the flag that determins whether images and audio
clips are cached internally by name, as described in
setCachingEnabled. |
AudioClip |
loadAudioClip(String name)
Searches the default audio clip search path for an audio clip with the specified
name and then loads it to create an AudioClip. |
Image |
loadImage(Image image)
Makes sure that the image is fully loaded before returning. |
Image |
loadImage(String name)
Searches the default image search path for an image with the specified name
and then loads it to create an Image. |
void |
setCachingEnabled(boolean flag)
This method sets an internal flag in the MediaTools package to indicate
whether images and audio clips are cached internally by name. |