寻汉化饥荒单机版汉化mod游戏 国产的也可以 复制的别来

爱问共享资料_在线资料分享平台
(window.slotbydup=window.slotbydup || []).push({
id: '2370785',
container: s,
size: '146,102',
display: 'inlay-fix'
娱乐、生活
积分排行榜
歌乐怀故人
热门资料推荐
Copyright &
IASK Corporation, All Right Reserved/linjiqin/archive//2488880.html
3.Java程序
import java.io.BufferedR
import java.io.BufferedW
import java.io.ByteArrayOutputS
import java.io.F
import java.io.FileInputS
import java.io.FileOutputS
import java.io.IOE
import java.io.InputS
import java.io.InputStreamR
import java.io.OutputS
import java.io.OutputStreamW
import java.io.PrintW
import java.io.UnsupportedEncodingE
import java.net.HttpURLC
import java.net.URL;
import org.junit.T
public class JxSendSmsTest {
* 获得腾讯QQ在线状态
* 输入参数:QQ号码 String,默认QQ号码:8698053。返回数据:String,Y = 在线;N = 离线;E = QQ号码错误;A = 商业用户验证失败;V = 免费用户超过数量
* @throws Exception
public void sendSms() throws Exception {
String qqCode = &&;//qq号码
String urlString = &.cn/webservices/qqOnlineWebService.asmx&;
String xml = JxSendSmsTest.class.getClassLoader().getResource(&SendInstantSms.xml&).getFile();
String xmlFile=replace(xml, &qqCodeTmp&, qqCode).getPath();
String soapActionString = &.cn/qqCheckOnline&;
URL url = new URL(urlString);
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
File fileToSend = new File(xmlFile);
byte[] buf = new byte[(int) fileToSend.length()];
new FileInputStream(xmlFile).read(buf);
httpConn.setRequestProperty(&Content-Length&, String.valueOf(buf.length));
httpConn.setRequestProperty(&Content-Type&, &text/ charset=utf-8&);
httpConn.setRequestProperty(&soapActionString&, soapActionString);
httpConn.setRequestMethod(&POST&);
httpConn.setDoOutput(true);
httpConn.setDoInput(true);
OutputStream out = httpConn.getOutputStream();
out.write(buf);
out.close();
byte[] datas=readInputStream(httpConn.getInputStream());
String result=new String(datas);
//打印返回结果
System.out.println(&result:& + result);
* 文件内容替换
* @param inFileName 源文件
* @param from
* @param to
* @return 返回替换后文件
* @throws IOException
* @throws UnsupportedEncodingException
public static File replace(String inFileName, String from, String to)
throws IOException, UnsupportedEncodingException {
File inFile = new File(inFileName);
BufferedReader in = new BufferedReader(new InputStreamReader(
new FileInputStream(inFile), &utf-8&));
File outFile = new File(inFile + &.tmp&);
PrintWriter out = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(new FileOutputStream(outFile), &utf-8&)));
while ((reading = in.readLine()) != null) {
out.println(reading.replaceAll(from, to));
out.close();
in.close();
//infile.delete(); //删除源文件
//outfile.renameTo(infile); //对临时文件重命名
return outF
* 从输入流中读取数据
* @param inStream
* @throws Exception
public static byte[] readInputStream(InputStream inStream) throws Exception{
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len = 0;
while( (len = inStream.read(buffer)) !=-1 ){
outStream.write(buffer, 0, len);
byte[] data = outStream.toByteArray();//网页的二进制数据
outStream.close();
inStream.close();
&4、SendInstantSms.xml文件如下,放在src目录下
&?xml version=&1.0& encoding=&utf-8&?&
&soap:Envelope xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance& xmlns:xsd=&http://www.w3.org/2001/XMLSchema& xmlns:soap=&http://schemas.xmlsoap.org/soap/envelope/&&
&soap:Body&
&qqCheckOnline xmlns=&.cn/&&
&qqCode&qqCodeTmp&/qqCode&
&/qqCheckOnline&
&/soap:Body&
&/soap:Envelope&
setRequestProperty &设置的请求属性的信息。这个一般按规定设置就行了。
但是有时候最坑的是他说在信封里面要根据不同的业务做区分
&soap:Envelope
这里会有改变。
有时间再写池子的
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:5619次
排名:千里之外
原创:31篇
转载:27篇
(7)(12)(5)(7)(14)(5)(5)(2)(1)您的举报已经提交成功,我们将尽快处理,谢谢!
大家还关注狗狗首页-中国最大的下载资源搜索网站
亲爱的狗狗用户,即日起暂停
网站服务。由此给您带来的不便,敬请谅解
--狗狗团队
has been closed down. Thank you all for your support, and we are sorry for any inconvenience.
--The Gougou Team

参考资料

 

随机推荐