Trinthlo

Converting Hex Values to Short Values

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