⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messageclass.java

📁 用Java写的彩信的程序。包括wsp/mime/mms几部分。
💻 JAVA
字号:
/* 
 * JVending - J2ME MMS Client
 *
 * Distributed under Apache style software license included with the source code.
 */

package org.jvending.messaging.mms;

/**
 * @author Shane Isbell
 * @version 1.0.0a
 * @created 04/03/27
 */



public class MessageClass {

    public static final int PERSONAL = 0;

    public static final int ADVERTISEMENT = 1;

    public static final int INFORMATIONAL = 2;

    public static final int AUTO = 3;


    public static String lookupMessageClass(int type) {
        switch(type) {
            case 0:
                return "Personal";
            case 1:
                return "Advertisement";
            case 2:
                return "Informational";
            case 3:
                return "Auto";
            default:
                return "Illegal Value";
        }        
    }


    public static int lookupMessageClass(String type) {
        if(type.equals("Personal"))
            return PERSONAL;
        else if(type.equals("Advertisement"))
            return ADVERTISEMENT;
        else if(type.equals("Informational"))
            return INFORMATIONAL;
        else if(type.equals("Auto"))
            return AUTO;
        else
            return -1;
       
    }


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -