And you need to use a separate serial usb cable/converter. Other than that, all the program does echo back any characters it receives.
There are a few spots in the code that bug me. Why does he allocate a byte array of 1 byte? just declare a byte, then use Serial readByte() and writeByte methods instead of read() and write().
I especially would not do a new byte every time I entered that delegate - very inefficient.