Re: Regarding byte transfer from java socket to c
Posted By:
Michael_Wax
Posted On:
Sunday, May 20, 2001 06:41 PM
Are you saying that you want to work digit-by-digit, or do a straight decimal-to-hexadecimal conversion, in which case each byte will not be directly assignable to a digit in the decimal value? If the latter, you can do it without writing very little code by using the static method Integer.toHexString(int value) to give you a String representation of the hexadecimal value, following by application of the appropriate method in the Byte class to convert each character to a byte.