登录
首页 » Java » Java获取字符串编码格式

Java获取字符串编码格式

于 2018-05-29 发布 文件大小:49KB
0 86
下载积分: 1 下载次数: 0

代码说明:

  根据字符串内容识别编码格式 简单实用 用来解决检测编码不统一的问题(Identifies the encoding format based on the string content)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • SocketApi
    C#连接交行银企直连客户端版本,可成功连接并进行通讯(C# Version of Bank-to-Enterprise Direct Connection)
    2020-11-11 15:49:44下载
    积分:1
  • 动态域名解析服务器
    动态域名解析服务器-Dynamic Domain Name Server
    2022-02-10 07:13:01下载
    积分:1
  • 宠物小精灵对战游戏
    宠物小精灵对战游戏,平台是Qt Creater,语言是Qt C++
    2022-01-25 16:34:28下载
    积分:1
  • MQTT通讯(基于C# MQTTNet开发)
    基于C# MQTTNet开发,Visual Studio 2017打开项目,其他版本不保证好用
    2019-10-08下载
    积分:1
  • VB-Winsock-HTTP-POST-GET
    Visual Basic 2010通过 Get Post方法对网页进行提交(vb.net Get Post submit pages)
    2013-06-28 15:19:13下载
    积分:1
  • 基于客户端|服务器模式的socket
    基于客户端|服务器模式的socket编程-Based on the c/s mode of socket programming
    2022-11-20 14:45:03下载
    积分:1
  • 02Select
    分为服务器端和客户端,分别运行后,可以进行通讯(Divided into server and client, respectively, after running, you can communicate)
    2014-05-19 22:09:51下载
    积分:1
  • c# 扫描IP Http Header
    c# 扫描IP Http Headerusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;using System.IO;namespace HScan{ public partial class Form1 : Form { int _currentThreads = 0; int _maxThreads = 100; Thread main = null; Thread mt = null; List threads = new List(); public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; } private void btnStart_Click(object sender, EventArgs e) { btnStart.Enabled = false; if (txtStart.Text.Trim() == "") { MessageBox.Show("起始IP不能为空."); return; } if (txtEnd.Text.Trim() == "") { MessageBox.Show("结束IP不能为空."); return; } int ts = Convert.ToInt32(txtThreads.Text); _maxThreads = ts; string startIp = txtStart.Text; string endIp = txtEnd.Text; TParameter tp=new TParameter(); tp.StartIp=startIp; tp.EndIp=endIp; tp.ThreadCount=ts; main = new Thread(new ParameterizedThreadStart(StartMe)); main.Start(tp); } protected void ThreadManage() { Thread c=null; while (true) { System.Object lockThis = new System.Object(); lock (lockThis) { for (int i = 0; i < threads.Count; i ) { if (threads[i] != null && !threads[i].IsAlive) { c = threads[i]; break; } } if (c != null) { threads.Remove(c); } } } } protected void StartMe(object ob) { mt = new Thread(new ThreadStart(ThreadManage)); mt.Start(); TParameter p = ob as TParameter; string curIp = p.StartIp; while (true) { for (int i = 0; i < _maxThreads; i ) { if (curIp != "") { if (_currentThreads >= _maxThreads) break; System.Object lockThis = new System.Object(); lock (lockThis) { _currentThreads ; if (_currentThreads > _maxThreads) _currentThreads = _maxThreads; string tip = curIp; Thread t = new Thread(new ParameterizedThreadStart(Run)); t.Start(tip); threads.Add(t); curIp = IPUtility.getLastIp(curIp, p.EndIp, 1); } } else { break; } } } } protected void Run(object ob) { string ip = ob.ToString(); SocketGetHead h = new SocketGetHead(); string ret = h.GetHtml(ip, 80); if (ret.IndexOf("DVRDVS-Webs") > 0) { ListViewItem item = new ListViewItem(); item.SubItems[0].Text = (listView1.Items.Count 1).ToString(); ListViewItem.ListViewSubItem lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = ip; item.SubItems.Add(lvSubItem); lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = "DVRDVS-Webs"; item.SubItems.Add(lvSubItem); listView1.Items.Add(item); } System.Object lockThis = new System.Object(); lock(lockThis) { lblCurIp.Text = ip; _currentThreads--; if (_currentThreads < 0) _currentThreads = 0; } } private void tsmCopy_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { string ip = listView1.SelectedItems[0].SubItems[1].Text; Clipboard.SetText(ip); } } private void tsmExport_Click(object sender, EventArgs e) { StreamWriter writer = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory "\export.txt",true); foreach (ListViewItem item in listView1.Items) { string ip=item.SubItems[1].Text; writer.WriteLine(ip); writer.Flush(); } writer.Flush(); writer.Close(); MessageBox.Show("导出成功!"); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } Thread.Sleep(5000); } private void btnStop_Click(object sender, EventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } btnStart.Enabled = true; } }}
    2014-06-23下载
    积分:1
  • 使用asp,自的流量统计小系统,便于日常察看本流量。...
    使用asp,自编的流量统计小系统,便于日常察看本网络流量。 -use asp, directed the flow of small statistical system to facilitate day-to-day look at the network traffic.
    2023-06-26 10:15:03下载
    积分:1
  • 湖北电信SOA平台短信发送实例,做SP的朋友可能有用(中兴平台)...
    湖北电信SOA平台短信发送实例,做SP的朋友可能有用(中兴平台)-Hubei Telecom to send message SOA platform examples, so a friend may be useful SP (ZTE platform)
    2022-06-01 00:09:18下载
    积分:1
  • 696524资源总数
  • 103904会员总数
  • 44今日下载