BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Wii RAM Hacking: Pointers and ASM
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/23/2024, 1:54 pm by Mac11ngAround

» IBM AIX Assembler Programming Reference - Useful For PPC ASM
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/21/2024, 5:00 pm by Mac11ngAround

» Note to Inactive New Members
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/14/2024, 4:50 am by Mac11ngAround

» Lego Stars Wars: The Complete Saga [RLGE64]
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/14/2024, 4:42 am by Mac11ngAround

» JMaster Duel Bot: A Yu-Gi-Oh! Master Duel Bot and Trainer for Steam
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/13/2024, 11:18 am by Bully@WiiPlaza

» Gecko.NET
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/13/2024, 11:11 am by Bully@WiiPlaza

» How to get a USB Gecko SE
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/13/2024, 11:05 am by Mac11ngAround

» USB Gecko Hacking Tutorials [Ultimate List]
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/13/2024, 10:54 am by Mac11ngAround

» Converting from PAL to NTSC-J (Pokemon Battle Revolution)
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/6/2024, 9:37 am by SnB@BWH

» Making RAM Dumps With Dolphin (No USB Gecko!)
Need Help With Java - ASCII to HEX Apache Common Codecs Empty7/6/2024, 9:20 am by SnB@BWH

Search
 
 

Display results as :
 


Rechercher Advanced Search

July 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
293031    

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Need Help With Java - ASCII to HEX Apache Common Codecs

2 posters

Go down  Message [Page 1 of 1]

Reclaimer Shawn

Reclaimer Shawn
Code Creator

Hello guys. In NetBeans IDE, I've placed common-codec-1.10.jar in my libraries. Whenever placing this method in my code
Code:

public static String toHex(String ascii)
 {
 return Hex.encodeHexString(text.getBytes());
 }

It tells me that class, enum, or interface expected, and whenever placing
return Hex.encodeHexString(text.getBytes()); in my code, it makes me import org.apache.commons.codec.binary.Hex;
It tells me I need to change method return type to Hex, and it doesn't work for me. I got this information from here: http://www.bullywiihacks.com/t4108-ascii-hex-dec-conversions#22788

How would I use the above code to get Text From a Text Field and then convert the Text Values to Hex, and then print them?
I assume after I get the code to work, I can place said HEX in a string, store different parts of it in variables, and then have it print where I need to. This will basically be finishing my entire program(except the comboboxes, I'll get to that later) as I already got Dec to Hex Conversion and Dec to Bin conversion thanks to these lines of code:
Code:

Integer.toString(variable , X)
X = 2 or 16 depending on which value I needed to return
Thanks for replying, and sorry for being a newb.

Reclaimer Shawn

Reclaimer Shawn
Code Creator

I solved my own problem! Although it required me making tons of if...else if statements and declaring over 100 variables, I created my own little ASCII to Hex Converter inside of my program. It sucked, but it'll work!

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Lol, there are libraries for all these things of course so you literally don't have to do anything.


_________________
Need Help With Java - ASCII to HEX Apache Common Codecs YBjg74I

Reclaimer Shawn

Reclaimer Shawn
Code Creator

I knew that, I just didn't know how to use the function after implementing the library. I got impatient waiting, and was antsy to finish the program, so I just made it myself :p

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum