Solved

equivalent of Chr$(ETX)...?

Posted on 2001-06-13
8
1,030 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
  • 5
  • 3
8 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 5 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example issue 6 40
servlet web applications   metadata-complete="true" or false 3 40
CSV file parsing thru Java 13 31
printf performancy 11 42
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

777 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