AccessFreak 0 Newbie Poster

I have a question about my java program.

I'm new to Java, but I learn fast:P.

I have the following problem.

I need to communicatie between 2 mobile phones. The entered character will be checked by methode checkletter. After completing the check, the frame will be set. The first 7 frames are for the sender. The next 7 frames are of the receiver. The 14th frame is an actionframe. From 15 and counting, the frames are for the letter that is entered.

The most important frame is 15. resulltString has an hexdecimal notation. If you entered "hello" as the play-word. If I search for the "l", it gives me this number 12.

12 means binair number like 01100. l is on the 3rd and 4th place.

The other player needs to open these slots.

That needs to happen within the if statement of method frameEvent().

That my problem. How do I get hex 12 to be a biniar number and also open the slots of the word. The null needs to get a dot. It has to be remembered for the next turn.

public void checkletter(String letter)
setFrameSender(getName());
    	setFrameReceiver(Opponent);
    	frame[14] = 'R';
    	
    	copyStringToFrame(resultString, 15, resultString.length());
    	sendFrame(frame);
public void frameEvent(byte[] frame)

String sendername = new String(frame, 0, 7).trim();
		String recname = new String(frame, 7, 7).trim();

if (frame[14] == 'R')
		{			
...........................................................
...........................................................
..........................................................
		}