Java Type Convert typeToHex(byte buffer[])

Here you can find the source of typeToHex(byte buffer[])

Description

type To Hex

License

Open Source License

Declaration

private static String typeToHex(byte buffer[]) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String typeToHex(byte buffer[]) {
        StringBuffer sb = new StringBuffer(buffer.length * 2);
        for (int i = 0; i < buffer.length; i++) {
            sb.append(Character.forDigit((buffer[i] & 240) >> 4, 16));
            sb.append(Character.forDigit(buffer[i] & 15, 16));
        }/*  w  w  w  .  jav a 2  s. co m*/
        return sb.toString();
    }
}

Related

  1. typeToClass(Class type)
  2. typeToFilename(String var)
  3. typeToInt(String type)
  4. typeToJavaCode(Class type)
  5. typeToSignature(String className)
  6. typeToSignature(String type)