i want to send a hex file to a serial port in java..so i need code for it.as a example.i am a student so m new in dis field.plz help me asap.
Printable View
i want to send a hex file to a serial port in java..so i need code for it.as a example.i am a student so m new in dis field.plz help me asap.
Do you have the code to send any file to a serial port?
What is a hex file? Does mean a non-text file that has bytes that can contain any of 256 values: 0x00 to 0xFF
no i dnt hav the code 2 send file..bt til now wat i kno is i cn send a file to serial port as a data or collection of bytes..bt nt as a whole file..so plz explain the way 2 do it!!
and 1 more thing , while sending a hex file i want 2 completely ignore the line feed..
What class and what method are you using to send what you are sending?
What is a hex file? Does mean a non-text file that has bytes that can contain any of 256 values: 0x00 to 0xFF
If the file contains binary data, it can have a byte with any value including a line feed character.
after finding serial ports and connecting to it, m making a file output stream for serial port.n passing ma hex file name to outputstream.
What is the name of the class you are using to write to the serial port with?
Does it have methods for writing bytes?
name of the class is outputstream and it has a write method which take argument of byte 2 b written on serial port
What is 2 b?
Please use English.
There is no Java SE class: outputstream. Java is case sensitive and all classes start with a uppercase letter.
yes..OutputStream is the class name..and sorry for using shortcut language. :P hey Norm can you give me a simple code to send bytes from a file to serial port?
Can you explain what the problem is when you write the contents of a file? Your descriptions have been vague.
Post the code you are using to write the file and the code you are using to read the file.