?
Solved

equivalent of Chr$(ETX)...?

Posted on 2001-06-13
8
Medium Priority
?
1,042 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:Howard888
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 10 total points
ID: 6190266
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
 
LVL 35

Expert Comment

by:TimYates
ID: 6190267
hehehe...  5 points ;-)

10 times easier than easy?

;-)

Tim.
0
 
LVL 92

Expert Comment

by:objects
ID: 6190468
Go Tim :)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 6190475
And I won't tell anyone that you know VB.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 6190503
EEEK!  Thank god..  I was about to offer you money ;-) hehehe
0
 
LVL 35

Expert Comment

by:TimYates
ID: 7171281
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
 
LVL 92

Expert Comment

by:objects
ID: 7173173
Tim,

I would have given you an 'A'.

mick
0
 
LVL 35

Expert Comment

by:TimYates
ID: 7173730
Cheers fella :-)  Hee hee, and thanks for not telling anyone about my VB knowledge ;)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question