equivalent of Chr$(ETX)...?

Hi all,
  I am developing an application that sends command to machine and receives information from it.
In Visual Basic, I used  'Chr$(ETX)' to check if it is end of transmission.
But I have no idea on how to do if with Java prgm.
Does anyone know what is the equivalent code/method in JAVA?

Thanks alot
Howard888Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
TimYatesConnect With a Mentor Commented:
to get the ETX char in java, you would use:

  (char)3

OR:  more readable:

private static final char ETX = (char)3 ;

then you can just check if the character you read in equals ETX

if( charIn == ETX )
  // end of transmission...

Hope this helps, and is right ;-)

Good Luck!!

Tim.
0
 
TimYatesCommented:
hehehe...  5 points ;-)

10 times easier than easy?

;-)

Tim.
0
 
objectsCommented:
Go Tim :)
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
objectsCommented:
And I won't tell anyone that you know VB.
0
 
TimYatesCommented:
EEEK!  Thank god..  I was about to offer you money ;-) hehehe
0
 
TimYatesCommented:
Woo woo!!  I got a grade C!!  HAHAHAHAHAH!!!

Remind me never to do anything less than 50 points again...it's not worth scuffing the skin off my fingertips on my keyboard for... ;)

Ta

Tim.

0
 
objectsCommented:
Tim,

I would have given you an 'A'.

mick
0
 
TimYatesCommented:
Cheers fella :-)  Hee hee, and thanks for not telling anyone about my VB knowledge ;)
0
All Courses

From novice to tech pro — start learning today.