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

📄 enterww.java~12~

📁 彩信网关程序。只支持发送。
💻 JAVA~12~
字号:
package mmscenter;import java.net.*;import java.io.*;public class EnterWW {  public EnterWW() {  }  public static String GoTo(String UrlString){    String result = "";    UrlString = "http://10.10.1.216:8080/mms/sendmms.jsp";    int data;//从输入流中获取数据    try{    URL url=new URL(UrlString);//创建连接的地址    HttpURLConnection  connection=(HttpURLConnection)url.openConnection();//打开连接//    int responseCode=connection.getResponseCode();//    String reponseStr = connection.getResponseMessage();    byte[] bytes = new byte[1024];//    System.out.println(reponseStr);    //返回Http的响应状态码    InputStream input=connection.getInputStream();    //获取输入流//    System.out.println("responseCode:"+responseCode);    while((data=input.read(bytes,0,1024))!=-1){      //System.out.println((new String(bytes,"GBK")));      String line =new String(bytes,"GBK");      result += line;      //int i = line.indexOf("搜狐首页");      //System.out.println(line.substring(i,i+5));//      if(i != -1){//        System.out.println(i+"****************************");//        break;//      }    }    }catch(Exception e){     e.printStackTrace() ;    }    return result;  }  public static String GetResultCode(String str){    String result = "";    if(str.indexOf("<RET>0</RET>")>=0){      result = "0";    }    return result ;  }  public static void main(String[] args) {    EnterWW enterWW1 = new EnterWW();    System.out.println(enterWW1.GoTo("dd"));  }}

⌨️ 快捷键说明

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