All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.remoting.HexDump Maven / Gradle / Ivy

package hudson.remoting;

/**
 * @author Kohsuke Kawaguchi
 */
public class HexDump {
    private static final String CODE = "0123456789abcdef";

    public static String toHex(byte[] buf) {
        return toHex(buf,0,buf.length);
    }
    public static String toHex(byte[] buf, int start, int len) {
        StringBuilder r = new StringBuilder(len*2);
        for (int i=0; i>4)&15));
            r.append(CODE.charAt(b&15));
        }
        return r.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy