com.vodafone.v10.sound
Class Sound

java.lang.Object
  |
  +--com.vodafone.v10.sound.Sound

public class Sound
extends java.lang.Object

Sound is a class for keeping sound data. This class provides functions for getting the size of sound data and analyzing the number of tracks necessary for playback of the data. A Java application must designate its playback data in the constructors and create instances. The passing of data to a constructor is done in either of two following ways:

  1. by passing data in a byte array
  2. by designating a URL pointing to the data.


Constructor Summary
Sound(byte[] data)
          Sound constructor.
Sound(java.lang.String url)
          Sound constructor.
 
Method Summary
 int getSize()
          Gets the size of sound data.
 int getUseTracks()
          Gets the number of tracks required for playback.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sound

public Sound(java.lang.String url)
      throws java.io.IOException
Sound constructor. Gets data from the designated URL and stores it.
Parameters:
url - A URL pointing to the data location
Throws:
IllegalArgumentException - if the URL is illegal, or if the data format is improper.
java.io.IOException - if a problem of some kind occurred while getting the data.

Sound

public Sound(byte[] data)
Sound constructor. Stores the designated byte array as sound data.
Parameters:
data: - Sound data
Throws:
NullPointerException - if data is null.
IllegalArgumentException - if the data format of sound data is improper.
Method Detail

getSize

public int getSize()
Gets the size of sound data.
Returns:
int - The size of sound data (in bytes)

getUseTracks

public int getUseTracks()
Gets the number of tracks required for playback.
Returns:
int - The number of tracks


Copyright 2002,2003 Aplix Corporation. All rights reserved. Aplix Confidential and Restricted.