📄 gb.java
字号:
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: Gb.java
package com.gamvan.tools;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
public class Gb
{
public Gb()
{
}
public String gb(String txt)
{
String rTxt = new String("");
if(txt != null && !txt.equals(""))
rTxt = txt;
else
rTxt = "";
return rTxt;
}
public String iso_utf(String txt)
{
String rTxt = new String("");
if(txt != null && !txt.equals(""))
try
{
rTxt = new String(txt.getBytes("UTF-8"), "ISO-8859-1");
rTxt = txt;
}
catch(UnsupportedEncodingException unsupportedencodingexception) { }
else
rTxt = "";
return rTxt;
}
public static String encodeUrl(String s)
{
if(s == null || s.equals(""))
return "";
StringBuffer sb = new StringBuffer();
for(int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
if(c >= 0 && c <= '\377')
{
sb.append(c);
} else
{
byte b[];
try
{
b = Character.toString(c).getBytes("UTF-8");
}
catch(Exception ex)
{
System.out.println(ex);
b = new byte[0];
}
for(int j = 0; j < b.length; j++)
{
int k = b[j];
if(k < 0)
k += 256;
sb.append("%" + Integer.toHexString(k).toUpperCase());
}
}
}
return sb.toString();
}
public static String toUTF8(String s)
{
if(s == null)
return "";
String rTxt = new String("");
try
{
rTxt = new String(s.getBytes("ISO-8859-1"), "UTF-8");
}
catch(UnsupportedEncodingException e)
{
e.printStackTrace();
rTxt = s;
}
return rTxt;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -