Skip to Main Content

New to Java

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!

Convert Int into UTF-8

794029Jan 3 2009 — edited Jan 3 2009
Does anyone know of pre-existing Library/package/API that would allow me to take an Int ant convert it to UTF-8
public class UTF {

    public String toText(int num)
    {
       String letter;
       switch(num){
            case 0x41: 
                letter = "A";
                break;
            case 0x42: 
                letter = "B";
                break;    
            case 0x43: 
                letter = "C";
                break;    
            case 48: 
                letter = "D";
                break;       
           .....
Ive thought about jut writing it all.. but why re-invent the wheel?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2009
Added on Jan 3 2009
6 comments
3,228 views