java 里有没有字模提取的包
比如输入“原”,对应的16进制
"原",
00H,10H--------1
FCH,3FH-------2
84H,00H--------3
84H,00H--------4
44H,10H--------5
F4H,3FH--------6
14H,10H--------7
F4H,1FH--------8
14H,10H--------9
F4H,1FH--------10
04H,01H---------11
24H,09H---------12
22H,11H---------13
12H,21H---------14
49H,21H---------15
80H,00H----------16
http://www.pudn.com/downloads13/sourcecode/java/detail52512.html
汉字字模点阵数据
http://wenda.tianya.cn/wenda/thread?tid=73c5288c3213a105
看看这个能不能帮到你
Java下 16进制 与 字符串 的相互转换函数
package com.nantian.iclient.atm.sdb;
public class Util {
public Util() {
}
/**
@return void
*/
public static void printHexString(String hint, byte[] b) {
System.out.print(hint);
for (int i = 0; i < b.length; i++) {
String hex = Integer.toHexString(b[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
System.out.print(hex.toUpperCase() + " ");
}
System.out.println("");
}
/**
*
@param b byte[]
@return String
*/
public static String Bytes2HexString(byte[] b) {
String ret = "";
for (int i = 0; i < b.length; i++) {
String hex = Integer.toHexString(b[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
ret += hex.toUpperCase();
}
return ret;
}
/**
将两个ASCII字符合成一个字节;
如:"EF"--> 0xEF
@param src0 byte
@param src1 byte
@return byte
*/
public static byte uniteBytes(byte src0, byte src1) {
byte _b0 = Byte.decode("0x" + new String(new byte[]{src0})).byteValue();
_b0 = (byte)(_b0 << 4);
byte _b1 = Byte.decode("0x" + new String(new byte[]{src1})).byteValue();
byte ret = (byte)(_b0 ^ _b1);
return ret;
}
/**
将指定字符串src,以每两个字符分割转换为16进制形式
如:"2B44EFD9" --> byte[]{0x2B, 0x44, 0xEF, 0xD9}
@param src String
@return byte[]
*/
public static byte[] HexString2Bytes(String src){
byte[] ret = new byte[8];
byte[] tmp = src.getBytes();
for(int i=0; i<8; i++){
ret[i] = uniteBytes(tmp[i*2], tmp[i*2+1]);
}
return ret;
}
}