Hello,
Further to an early post - I was recommended to look at the HexString class to help me
with my problem, but pardon my ignorance but i cant get it working for the life of me !
I assume that the method of getting a string into a byte array of its hex
representation is as follows:
1-call getBytes() on String giving byte array w/decimal ascii codes
2-hexify(byte[]) it giving a String in hex format
3-assign the byte array the return value of parseHexString() meaning that each byte
has 2 hex chars
e.g.
String = "AAA" getBytes() yields [65][65][65]
hexify yields "414141"
and then parseHexString("414141") gives [41][41][41]
this doesn't work, I constantly get number format exceptions (could this be because
hexify puts spaces between hex pairs and thus parsing it fails ?!)- i dont know which
of the functions to use at this stage - or in which order ?! so if anybody could
please tell me the step by step procedure for getting a String's hex representation
into a byte array with 2 hex chars per byte i would very much appreciate. and
conversly the inverse of it also i.e. byte array of pairs of hex chars into an "ascii"
String !
Thank you in advance,
Paul
_____________________________________
Get your free E-mail at http://www.ireland.com
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.