Robin2:
It is unlikely to be practical to have two serial connections attached to the same Arduino pins.
Exactly. Pins 0 and 1 are connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip. If you also connect them to an external TTL serial device then the two drivers will both be trying to drive the RX pin and fighting against each other. Whichever device wins will be able to send data; you won't be able to receive from the other device.
Given that you have four hardware UARTs to choose from, trying to use the same UART twice seems to be inventing a completely unnecessary problem for yourself - just connect them to different UARTs.
Also, Serial.write((char*)&inByte,1); seems like an extremely contrived way to write a byte, and this sort of pointer type conversion is not recommended.
strong12345:
Because I have to use Serial *4 to communicate with other device, so that had to select "Serial0".
And what about Serial1 or Serial2
"Had to select" makes no sense when that is not a techincal option.
If you really have no option but to use one Serial port for two purposes you will almost certainly need some external circuitry to separate the two systems electrically, and maybe in an ideal world have some means for the Arduino to select between them. Some AND gates (such as a 74HC08) might be suitable. The Arduino could control one of the pins to disable a gate.
If you can't select between them you will need to be sure that the two systems never talk at the same time.