javaextensions/wma/sms_cbs/javasrc/com/nokia/mj/impl/sms/SMSBinaryMessageImpl.java
branchRCL_3
changeset 14 04becd199f91
child 17 0fd27995241b
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 package com.nokia.mj.impl.sms;
       
    19 
       
    20 import javax.wireless.messaging.BinaryMessage;
       
    21 
       
    22 /**
       
    23  * This class implements BinaryMessage and extends from SMSMessageImpl
       
    24  */
       
    25 public final class SMSBinaryMessageImpl extends SMSMessageImpl implements
       
    26         BinaryMessage
       
    27 {
       
    28     private byte[] iPayload;
       
    29 
       
    30     public SMSBinaryMessageImpl(String aAddress, long aTimestamp)
       
    31     {
       
    32         super(aAddress, aTimestamp);
       
    33     }
       
    34 
       
    35     /**
       
    36      * Method to get the message payload text
       
    37      * @returns null if not supported
       
    38      * @see
       
    39      */
       
    40     public String getPayloadTextData()
       
    41     {
       
    42         return null;
       
    43     }
       
    44 
       
    45     /**
       
    46     *Refer About this in JSR-205(Wireless Messaging API 2.0)specification
       
    47     */
       
    48 
       
    49     public byte[] getPayloadBinaryData()
       
    50     {
       
    51         return getPayloadData();
       
    52     }
       
    53 
       
    54     /**
       
    55       *Refer About this in JSR-205(Wireless Messaging API 2.0)specification
       
    56       */
       
    57     public byte[] getPayloadData()
       
    58     {
       
    59         return iPayload;
       
    60     }
       
    61 
       
    62     /**
       
    63       *Refer About this in JSR-205(Wireless Messaging API 2.0)specification
       
    64       */
       
    65     public void setPayloadData(byte[] aData)
       
    66     {
       
    67         iPayload = aData;
       
    68     }
       
    69 
       
    70     /**
       
    71      * Method to get the type of this message
       
    72      * @return returns message type
       
    73      */
       
    74     public int getType()
       
    75     {
       
    76         return MESSAGE_BINARY;
       
    77     }
       
    78 }