View Javadoc

1   /* ***** BEGIN LICENSE BLOCK *****
2    * Version: MPL 1.1
3    *
4    * The contents of this file are subject to the Mozilla Public License Version
5    * 1.1 (the "License"); you may not use this file except in compliance with
6    * the License. You may obtain a copy of the License at
7    * http://www.mozilla.org/MPL/
8    *
9    * Software distributed under the License is distributed on an "AS IS" basis,
10   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11   * for the specific language governing rights and limitations under the
12   * License.
13   *
14   * The Original Code is "SMS Library for the Java platform".
15   *
16   * The Initial Developer of the Original Code is Markus Eriksson.
17   * Portions created by the Initial Developer are Copyright (C) 2002
18   * the Initial Developer. All Rights Reserved.
19   *
20   * Contributor(s):
21   *
22   * ***** END LICENSE BLOCK ***** */
23  package org.marre.sms.nokia;
24  
25  import org.marre.sms.SmsConstants;
26  import org.marre.sms.SmsPortAddressedMessage;
27  import org.marre.sms.SmsUserData;
28  
29  /***
30   * 
31   * @author Markus Eriksson
32   * @version $Id: NokiaRingTone.java,v 1.8 2005/05/12 07:50:45 c95men Exp $
33   */
34  public class NokiaRingTone extends SmsPortAddressedMessage
35  {
36      protected byte[] myRingToneData;
37      
38      /***
39       * Creates a ring tone
40       *
41       * @param theRingTone The ring tone in nokia binary format
42       */
43      public NokiaRingTone(byte[] theRingTone)
44      {
45          super(SmsConstants.PORT_NOKIA_RING_TONE, 0);
46          
47          myRingToneData = theRingTone;
48      }
49  
50      public SmsUserData getUserData()
51      {
52          return new SmsUserData(myRingToneData);
53      }
54  }