亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? encryptedsmsmidlet.java

?? J2ME MIDP_Example_Applications
?? JAVA
字號:
// Copyright 2003 Nokia Corporation.
//
// THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
// EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
// FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
// OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
// ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
// OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
// SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
// RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
// OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
// BY THIRD PARTIES
//
// Furthermore, information provided in this source code is preliminary,
// and may be changed substantially prior to final release. Nokia Corporation
// retains the right to make changes to this source code at
// any time, without notice. This source code is provided for informational
// purposes only.
//
// Nokia and Nokia Connecting People are registered trademarks of Nokia
// Corporation.
// Java and all Java-based marks are trademarks or registered trademarks of
// Sun Microsystems, Inc.
// Other product and company names mentioned herein may be trademarks or
// trade names of their respective owners.
//
// A non-exclusive, non-transferable, worldwide, limited license is hereby
// granted to the Licensee to download, print, reproduce and modify the
// source code. The licensee has the right to market, sell, distribute and
// make available the source code in original or modified form only when
// incorporated into the programs developed by the Licensee. No other
// license, express or implied, by estoppel or otherwise, to any other
// intellectual property rights is granted herein.
import java.io.*;
import javax.microedition.io.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.wireless.messaging.*;

// Main class which inits the connection and create the screens
// It owns the MessageConnection and Display
public class EncryptedSMSMIDlet
  extends MIDlet
  implements MessageListener, Runnable
{
  private final Image logo;
  private final SendScreen displayable;

  private int port;
  private MessageConnection conn;
  private Message nextMessage;


  public EncryptedSMSMIDlet()
  {
    // init basic parameters
    logo = makeImage("/logo.png");
    try
    {
      port = Integer.parseInt(getAppProperty("port"));
    }
    catch (Exception e)
    {
      // in case the property is missing or with a wrong format
      port = 6535;
    }
    ErrorScreen.init(logo, Display.getDisplay(this));
    displayable = new SendScreen(this);
  }


  public void startApp()
  {
    // Build the connection string
    String connection = "sms://:" + port;
    try
    {
      // Initiate the connection and add listener
      conn = (MessageConnection) Connector.open(connection);
      conn.setMessageListener(this);
    }
    catch (IOException e)
    {
      ErrorScreen.showError(
        "Exception creating message connection to "
        + connection, displayable);
    }

    Displayable current = Display.getDisplay(this).getCurrent();

    if (current == null)
    {
      // shows splash screen
      String text = getAppProperty("MIDlet-Name") + "\n" +
          getAppProperty("MIDlet-Vendor");
      Alert splashScreen = new Alert(null,
          text,
          logo,
          AlertType.INFO);
      splashScreen.setTimeout(3000);

      Display.getDisplay(this).setCurrent(splashScreen, displayable);
    }
    else
    {
      Display.getDisplay(this).setCurrent(current);
    }
  }


  public void pauseApp()
  {
  }


  public void destroyApp(boolean unconditional)
  {
    try
    {
      // Close the connection on exit
      if (conn != null)
      {
        conn.close();
      }
    }
    catch (IOException e)
    {
      // Ignore since we are closing anyway
    }
  }


  // Asynchronous callback for inbound message.
  public void notifyIncomingMessage(MessageConnection conn)
  {
    if (conn == this.conn)
    {
      try
      {
        // Create a ReceiveScreen upon message removal
        BinaryMessage incomingMessage =
          (BinaryMessage) conn.receive();
        ReceiveScreen handler =
          new ReceiveScreen(this, incomingMessage);
        Display.getDisplay(this).setCurrent(handler);
      }
      catch (IOException e)
      {
        ErrorScreen.showError(
          "Exception receiving message " + e.getMessage(),
          displayable);
      }
      catch (SecurityException e)
      {
        ErrorScreen.showError("Exception sending message(s) "
          + e.getMessage(),
          displayable);
      }
    }
  }


  // Send message in a different thread
  public void run()
  {
    if (nextMessage != null)
    {
      try
      {
        conn.send(nextMessage);
      }
      catch (IOException e)
      {
        ErrorScreen.showError("Exception sending message(s) "
          + e.getMessage(),
          displayable);
      }
      catch (SecurityException e)
      {
        ErrorScreen.showError("Sending message not allowed"
          + e.getMessage(),
          displayable);
      }
    }
    nextMessage = null;
  }


  // loads a given image by name
  static Image makeImage(String filename)
  {
    Image image = null;

    try
    {
      image = Image.createImage(filename);
    }
    catch (Exception e)
    {
      // use a null image instead
    }

    return image;
  }


  void showMessage(String message)
  {
    ErrorScreen.showError(message, displayable);
  }


  void sendMessage(String number,
           String plainText,
           String password,
           boolean addDigest)
  {
    if (conn != null)
    {
      // create a new message
      BinaryMessage binarySMS = (BinaryMessage) conn.newMessage(
          MessageConnection.BINARY_MESSAGE);
      String address = new StringBuffer("sms://")
        .append(number)
        .append(":")
        .append(port).toString();
      binarySMS.setAddress(address);

      // do encryption
      long difference = System.currentTimeMillis();
      try
      {
        byte[] messageContent = MessageCodec.encodeMessage(plainText,
                                                           password,
                                                           addDigest);
        // measire how long does it take to encrypt
        difference = System.currentTimeMillis() - difference;
        if (messageContent != null)
        {
          binarySMS.setPayloadData(messageContent);
          StringBuffer report = new StringBuffer(
              "Encryption succesful using cipher ")
              .append(MessageCodec.createEngine().getAlgorithmName());
          if (addDigest)
          {
            report.append(" and digest ")
              .append(MessageCodec.createDigest().
                getAlgorithmName());
          }
          report.append(" took ")
            .append(difference)
            .append(" ms. Overall message size is ")
            .append(messageContent.length)
            .append(" and uses ")
            .append(conn.numberOfSegments(binarySMS))
            .append(" segments");
          showReport(report.toString(), messageContent);
          nextMessage = binarySMS;
          // send the message in another thread
          new Thread(this).start();
        }
      }
      catch (Exception e)
      {
        showMessage(e.getMessage());
      }
    }
    else
    {
      showMessage("No connection available");
    }
  }


  // shows the main screen
  void showMain()
  {
    Display.getDisplay(this).setCurrent(displayable);
  }

  void showReport(String result, byte[] content) {
    Display.getDisplay(this).setCurrent(
      new ReportScreen(this, result, content, content.length));
  }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人免费视频| 国产日产欧美一区二区三区| 日韩免费看网站| 精品久久久久久久久久久久久久久| 欧美成人vps| 激情都市一区二区| 高清在线成人网| 欧美亚洲另类激情小说| 3atv在线一区二区三区| 久久夜色精品一区| 亚洲国产中文字幕在线视频综合| 奇米影视一区二区三区小说| 高清不卡在线观看| 91九色02白丝porn| 精品精品国产高清a毛片牛牛| 亚洲精品一二三四区| 久久精品国产亚洲一区二区三区| 不卡一区二区在线| 日韩午夜小视频| 中文字幕一区二区三中文字幕| 午夜欧美在线一二页| 国产成人在线看| 欧美福利视频一区| 最新高清无码专区| 久久精品免费看| 97久久人人超碰| 2014亚洲片线观看视频免费| 亚洲精选免费视频| 国产精品99久久久久久久女警| 欧美日韩精品一区二区天天拍小说| 2021国产精品久久精品| 午夜国产精品影院在线观看| 成熟亚洲日本毛茸茸凸凹| 7878成人国产在线观看| 亚洲欧美国产毛片在线| 国产麻豆精品theporn| 91精品蜜臀在线一区尤物| 中文字幕永久在线不卡| 国产一区二区中文字幕| 欧美日韩二区三区| 亚洲天堂久久久久久久| 国产麻豆精品一区二区| 欧美第一区第二区| 午夜一区二区三区视频| 色诱视频网站一区| 欧美韩国一区二区| 国产毛片一区二区| 欧美一区二区在线不卡| 五月综合激情网| 色婷婷综合中文久久一本| 国产亚洲精久久久久久| 精品一区二区三区免费观看 | 久久久91精品国产一区二区精品| 香蕉影视欧美成人| 欧美系列一区二区| 亚洲欧美日韩久久| jizz一区二区| 国产欧美精品一区aⅴ影院 | 久久久精品综合| 日本vs亚洲vs韩国一区三区 | 日本伊人色综合网| 欧美影院精品一区| 亚洲综合视频网| 26uuu亚洲综合色欧美| 热久久国产精品| 91麻豆精品国产自产在线观看一区| 亚洲一区二区三区四区在线 | 一区二区三区中文字幕| 99这里只有精品| 国产精品久线在线观看| 成人永久aaa| 国产精品狼人久久影院观看方式| 国产suv一区二区三区88区| 日本一区免费视频| 成人免费视频播放| 国产精品国产成人国产三级| 成人丝袜18视频在线观看| 中文字幕第一页久久| 成人国产免费视频| 国产精品色哟哟| 91麻豆精品在线观看| 日韩一区在线看| 一本到高清视频免费精品| 一区二区三区四区激情| 欧美日韩三级在线| 秋霞午夜鲁丝一区二区老狼| 精品国内片67194| 国产91精品精华液一区二区三区| 国产精品欧美极品| 色婷婷久久99综合精品jk白丝| 亚洲欧美日本在线| 欧美精选在线播放| 久久精品国产成人一区二区三区 | 国产精品99久久久久久宅男| 欧美韩国日本综合| 91美女片黄在线| 亚洲国产一区二区视频| 91精品国产一区二区| 麻豆国产一区二区| 国产精品少妇自拍| 欧美中文字幕一区| 麻豆成人免费电影| 欧美极品少妇xxxxⅹ高跟鞋| 91免费国产在线| 日韩一区欧美二区| 久久久久久久性| 色婷婷综合久久久中文字幕| 日韩电影免费在线| 中文字幕第一页久久| 欧美主播一区二区三区| 狠狠色伊人亚洲综合成人| 亚洲天堂成人网| 欧美一区二区三区四区视频| 成人精品在线视频观看| 亚洲成av人**亚洲成av**| 欧美刺激脚交jootjob| 成人app在线观看| 日韩激情视频网站| 日本一区二区成人在线| 欧美日韩一级黄| 粉嫩蜜臀av国产精品网站| 亚洲v日本v欧美v久久精品| 久久丝袜美腿综合| 欧美日韩在线直播| 国产成人在线免费| 午夜亚洲福利老司机| 国产精品久久久久影院| 欧美欧美欧美欧美首页| 国产成人久久精品77777最新版本| 亚洲自拍偷拍图区| 国产婷婷精品av在线| 欧美日韩国产免费一区二区| 成人午夜av影视| 精品在线一区二区| 一区二区三区美女| 国产欧美一区二区精品婷婷| 欧美日韩在线播放一区| 成人黄色在线看| 青椒成人免费视频| 亚洲美女少妇撒尿| 久久天天做天天爱综合色| 制服丝袜亚洲色图| 国产精品欧美一区二区三区| 欧美一级夜夜爽| 一本到三区不卡视频| 岛国av在线一区| 精品一区二区三区在线播放| 偷拍一区二区三区四区| 亚洲欧洲性图库| 久久―日本道色综合久久| 欧美肥妇free| 色菇凉天天综合网| 成人国产精品免费网站| 国产一区二区在线电影| 日本aⅴ免费视频一区二区三区| 亚洲精品欧美专区| 中文字幕一区二区三区四区 | 国产精品亚洲人在线观看| 日韩中文字幕一区二区三区| 一区二区三区四区国产精品| 国产精品国产三级国产三级人妇| 久久免费视频色| 精品国产一区二区三区久久久蜜月| 欧美性大战久久久久久久| 色悠悠亚洲一区二区| 99re8在线精品视频免费播放| 成人性生交大片| 国产传媒一区在线| 国产呦精品一区二区三区网站| 日本亚洲视频在线| 日韩高清欧美激情| 天天av天天翘天天综合网| 亚洲国产中文字幕| 亚洲电影第三页| 亚洲丰满少妇videoshd| 一区二区三国产精华液| 亚洲一区二区免费视频| 亚洲综合激情另类小说区| 亚洲一区二区综合| 亚洲愉拍自拍另类高清精品| 一区二区不卡在线播放| 亚洲另类春色校园小说| 夜夜精品浪潮av一区二区三区| 亚洲欧美一区二区三区国产精品 | 欧美综合一区二区| 在线免费观看不卡av| 欧美亚洲丝袜传媒另类| 欧美色视频一区| 欧美嫩在线观看| 91精品在线观看入口| 日韩欧美国产wwwww| 欧美成人一区二区三区在线观看 | 国产99久久久国产精品潘金网站| 国模少妇一区二区三区| 国产高清亚洲一区| 不卡av免费在线观看| 国产河南妇女毛片精品久久久| 日本女人一区二区三区| 视频一区欧美精品| 首页亚洲欧美制服丝腿|