Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text compression program

807607Jan 2 2007 — edited Jan 2 2007
Hi, i am writing a text compression program, which takes a file and outputs it as a series of Hex numbers.

At present, i have written a small amount of code which simply transforms each charcter to a hex figure. I have been using the toHexString method of the Integer class, which has been returning the number in the format 2e. As i have been given a decompressor program to work with, my hex must take the form 0x2e.

The decompressor analyses one byte at a time, so instead of taking 0x2e, it is taking 0, x, 2, and e as 4 bytes. Does anyone know if there is a way i can change the type of my string so that this will work?

Thanks in advance...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2007
Added on Jan 2 2007
30 comments
341 views