package request;
import java.io.BufferedReader;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;
public class Main {
public static void main(String[] args) throws UnsupportedEncodingException {
String encoding = System.getProperty("file.encoding");
System.out.println(encoding);
String encoding1 = URLEncoder.encode("林", "utf-8");
System.out.println(encoding1);
try {
URL my_url = new URL(
// "http://127.0.0.1:4664/search?q=%E5%BA%84%E6%B0%B8%E5%94%A4&flags=68&num=10&s=t4VEGJVSnbZ9Mf8Ruz6SGqPcTYA&format=xml");
// "http://127.0.0.1:4664/search&s=XZAXASVZUPL4rIYhwEiuY-PCwfE?q=file&num=10&format=xml");
"http://127.0.0.1:4664/search&s=XZAXASVZUPL4rIYhwEiuY-PCwfE?q="+encoding1+"&num=10&format=xml");
InputStreamReader input = new InputStreamReader(my_url.openStream(),"UTF-8");
BufferedReader br = new BufferedReader(input);
String strTemp = "";
while (null != (strTemp = br.readLine())) {
System.out.println(strTemp);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
分享到:
相关推荐
C# Invoke多线程调用Demo......
手机短信调用的WIN API,使用者可以通过这些API的调用通过JAVA来实现手机短信的发送接收
C_窗体中Invoke和BeginInvoke方法详解
《精通.NET互操作P/Invoke,C++Interop和COM Interop》包括3部分,平台调用——主要用于解决在托管代码中调用非托管程序设计语言编写的flat API(如Win32 API、C/C++风格的API等)的问题;C++ Interop——技术专门用于...
the difference of Invoke and BeginInvoke
P/Invoke Interop Assistant,它支持托管代码和非托管代码之间的方法签名的转换,而且直接生成相关的C#或者是VB的方法调用代码。这个签名的转换,不只是适用于Windows的方法签名,只要给定一个C头文件,就可以转换...
Ivoke-WCMDump 什么是Credential Manager ...从Credential Manager导出Windows凭据的Powershell脚本 https://github.com/peewpw/Invoke-WCMDump PS>Import-Module .\Invoke-WCMDump.ps1 ...Invoke-WCMDump
0.60$ react-native link react-native-invoke-app用法 import invokeApp from 'react-native-invoke-app' ;// Within your headless functioninvokeApp ( ) ;高级用法您可以将对象传递给invokeApp方
就Invoke和BeginInvoke进行对比介绍,穿插了一些例子在里面
本程序实现Invoke反射,内置说明txt文档,可以参考
调用ATTACKAPI [不推荐使用] 我们建议使用: : 一个PowerShell脚本,可通过其自己的API与MITER ATT&CK框架进行交互,以收集有关MITER ATT...git clone https://github.com/Cyb3rWard0g/Invoke-ATTACKAPI.git cd Invo
让你快速掌握INvoke与BeginInvoke的区别,HAHA
socket 源码程序 包含socket服务端 ,客户端,通过 Networkstream 流 streamReader /streamWriter进行动态获取写入信息。并且使用 委托 invoke ==
AutoCAD .NET ARX Invoke的应用
Invoke 是简单的 Python 系统任务执行程序。示例:from invoke import run, task @task def clean(docs=False, bytecode=False, extra=''): patterns = ['build'] if docs: patterns.append('docs/_...
忽略跨线程访问的错误 CheckForIllegalCrossThreadCalls = false,但是这个方法很不稳定,使用invoke方法解决跨线程访问的问题,里边有2个例子, 通过自己额外创建的线程改变label控件中的内容从而验证invoke方法
Invoke-ARPScan.ps1
可以把C/C++中的数据类型、结构体数据格式转换为C#或者VB版本中的对应格式类型。很方便
BPEL 用Invoke引用外部服务的例子,ConverterProj.war是需要调用的外部服务发布到TOMCAT下的包 ConverterProj.rar是外部服务的工程 InvokeWebServiceProj.rar是调用外部服务的BPEL工程 运行:将InvokeWebServiceProj...