📄 tools.java
字号:
/*
* Created on 2005-5-24
*
*/
package name.lxm.robot.arch;
import java.util.Formatter;
/**
* Auxiliary tools for communication and calculation
*
* @author Richard Lee
*/
public class Tools {
Formatter f = new Formatter();
Object[] obj = new Object[1];
public Tools()
{
}
/**
* Convert the byte to char for display
*
* @param buf2 the data buffer
* @param c the length of the data in the buffer
* @return the string of sequence bytes
*/
public String convertByte2Char(byte[] buf2, int c) {
for (int i = 0; i < c; i++) {
obj[0] = new Byte(buf2[i]);
f.format("%1$02x ", obj);
}
return f.toString().toUpperCase();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -