⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tools.java

📁 j2me实现的移动机器人代码(Java实现)
💻 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 + -