?? test_charset.java
字號:
package H;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Set;
import A.s;
public class Test_Charset extends s {
/**
* @param args
*/
public static void main(String[] args) {
Charset cset = Charset.forName("ISO-8859-1");// forName A charset
// object for the named
// charset
String str = "haode 中國人!";
ByteBuffer buffer = cset.encode(str);
byte[] bytes = buffer.array();
for (int i = 0; i < bytes.length; i++)
System.out.print((char) bytes[i]+System.getProperty("line.separator"));
// Test_Charset t = new Test_Charset();
Test_Charset.p(str);
// new share();
// p(System.getProperty("line.separator"));
// share.
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -