Trinthlo

Converting Hex Values to Byte Values

<cffunction name="hexToByte" access="public" output="false" returntype="string">
    <cfargument name="hexValue" type="string" required="false" default="" />
    <cfset var results = "" />
    <cfset var byte = createObject("java", "java.lang.Byte") />
    <cftry>
        <cfset results = byte.valueOf(arguments.hexValue, 16).byteValue() />
        <cfcatch></cfcatch>
    </cftry>
    <cfreturn results />
</cffunction>