* @throws IOException
     */
    private void writeByteString(String str) throws IOException {
        int len = str.length();
        for(int i = 0; i < len; i++) {
            int val = ((int) str.charAt(i)) & 0xFF;
            output.write(val);
        }
    }